setHeliBladeCollisionsEnabled | Multi Theft Auto: Wiki Skip to content

setHeliBladeCollisionsEnabled

Client-side
Server-side
Shared

Pair: getHeliBladeCollisionsEnabled

Manual Review Required

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


This function changes the state of the helicopter blades collisions on the specified vehicle.

OOP Syntax Help! I don't understand this!

  • Method:vehicle:setHeliBladeCollisionsEnabled(...)
  • Variable: .heliBladeCollisionsEnabled

Syntax

bool setHeliBladeCollisionsEnabled ( vehicle theVehicle, bool collisions )
Required Arguments
  • theVehicle: The helicopter that will have the blades collisions set.
  • collisions: The state of the helicopter blades collisions.

Returns

  • bool: value

Returns true if the collisions are set for the specified vehicle, false if the collisions can't be set for the specified vehicle, if the vehicle is not a helicopter or if invalid arguments are specified.

Code Examples

shared

This example disables blades collisions when a player enters a helicopter as a driver.

function onVehicleEnter ( thePlayer, seat, jacked )
--If the player entered a helicopter
if ( getVehicleType ( source ) == "Helicopter" ) then
--If the player entered as a driver
if ( seat == 0 ) then
-- Turn off collisions
setHeliBladeCollisionsEnabled ( source, false )
end
end
end
addEventHandler ( "onClientVehicleEnter", root, onVehicleEnter )

See Also

Vehicle Functions