CreateSWATRope: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
mNo edit summary
(Remove obsolete Requirements section)
 
(13 intermediate revisions by 8 users not shown)
Line 1: Line 1:
__NOTOC__
__NOTOC__
{{New feature|3.0120|1.2|
'''Available only in MTA SA 1.1.1 r3250 and onwards'''
}}
{{Client function}}
{{Client function}}
Creates a SWAT rope like that of the rope in single player used by SWAT Teams abseiling from the Police Maverick.
Creates a SWAT rope like that of the rope in single player used by SWAT Teams abseiling from the Police Maverick.
Line 14: Line 11:
*'''fx, fy, fz:''' the world coordinates where the effect originates.
*'''fx, fy, fz:''' the world coordinates where the effect originates.
*'''duration:''' the amount in miliseconds the rope will be there before falling to the ground.
*'''duration:''' the amount in miliseconds the rope will be there before falling to the ground.
<!--
 
==Example==
==Example==
No example here yet.
This example creates a Swat rope in police maverick when you use the command /createrope
<section name="Client" class="client" show="true">


<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
function SwatRope()
    local myVehicle = getPedOccupiedVehicle(localPlayer)
    if myVehicle and getVehicleName(myVehicle) == "Police Maverick" then
        local x,y,z = getElementPosition(myVehicle)
        createSWATRope(x, y, z, 11111) 
    end
end
addCommandHandler("createrope", SwatRope)
</syntaxhighlight>
</syntaxhighlight>
</section>
-->


==See Also==
==See Also==
{{Client Effects functions}}
{{client world functions}}

Latest revision as of 15:33, 7 November 2024

Creates a SWAT rope like that of the rope in single player used by SWAT Teams abseiling from the Police Maverick.

Syntax

bool createSWATRope ( float fx, float fy, float fZ, int duration )

Required Arguments

  • fx, fy, fz: the world coordinates where the effect originates.
  • duration: the amount in miliseconds the rope will be there before falling to the ground.

Example

This example creates a Swat rope in police maverick when you use the command /createrope

function SwatRope()
    local myVehicle = getPedOccupiedVehicle(localPlayer)
    if myVehicle and getVehicleName(myVehicle) == "Police Maverick" then
        local x,y,z = getElementPosition(myVehicle)
        createSWATRope(x, y, z, 11111)  
    end
end
addCommandHandler("createrope", SwatRope)

See Also