createSWATRope | Multi Theft Auto: Wiki Skip to content

createSWATRope

Client-side
Server-side
Shared

Manual Review Required

Please finish this page using the corresponding Old Wiki article. Go to Contribution guidelines for more information.


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: MISSING_PARAM_DESC
  • fy: MISSING_PARAM_DESC
  • fZ: MISSING_PARAM_DESC
  • duration: the amount in miliseconds the rope will be there before falling to the ground.

Returns

  • bool: value

Code Examples

shared

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

World Functions