SetHeliBladeCollisionsEnabled: Difference between revisions
Jump to navigation
Jump to search
(Created page with "__NOTOC__ {{Server client function}} This function changes the state of the helicopter blades collisions on the specified vehicle. ==Syntax== <syntaxhighlight lang="lua"> bool setHeliBladeCo...") |
(Updated the page according to r6987) |
||
(6 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
{{ | {{Client function}} | ||
This function changes the state of the helicopter blades collisions on the specified vehicle. | This function changes the state of the helicopter blades collisions on the specified vehicle. | ||
==Syntax== | ==Syntax== | ||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
bool setHeliBladeCollisionsEnabled ( vehicle theVehicle , bool collisions ) | bool setHeliBladeCollisionsEnabled ( vehicle theVehicle, bool collisions ) | ||
</syntaxhighlight> | </syntaxhighlight> | ||
{{New feature/item|3.0141|1.4.0|6987|{{OOP||[[vehicle]]:setHeliBladeCollisionsEnabled|heliBladeCollisionsEnabled|getHeliBladeCollisionsEnabled}}}} | |||
===Required Arguments=== | ===Required Arguments=== | ||
*'''theVehicle:''' The | *'''theVehicle:''' The helicopter that will have the blades collisions set. | ||
*'''collisions:''' The state of the helicopter blades collisions | *'''collisions:''' The state of the helicopter blades collisions. | ||
===Returns=== | ===Returns=== | ||
Line 16: | Line 17: | ||
==Example== | ==Example== | ||
<section name=" | <section name="Client" class="client" show="true"> | ||
This example disables blades collisions when a player enters a helicopter as a driver. | This example disables blades collisions when a player enters a helicopter as a driver. | ||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
function onVehicleEnter ( thePlayer, seat, jacked ) | function onVehicleEnter ( thePlayer, seat, jacked ) | ||
--If the player entered a helicopter | --If the player entered a helicopter | ||
if ( | if ( getVehicleType ( source ) == "Helicopter" ) then | ||
--If the player entered as a driver | --If the player entered as a driver | ||
if ( seat == 0 ) then | if ( seat == 0 ) then | ||
-- | -- Turn off collisions | ||
setHeliBladeCollisionsEnabled ( source, false ) | |||
end | end | ||
end | end | ||
end | end | ||
addEventHandler ( " | addEventHandler ( "onClientVehicleEnter", root, onVehicleEnter ) | ||
</syntaxhighlight> | </syntaxhighlight> | ||
</section> | </section> | ||
==See Also== | ==See Also== | ||
{{ | {{Client vehicle functions}} |
Latest revision as of 11:29, 31 December 2014
This function changes the state of the helicopter blades collisions on the specified vehicle.
Syntax
bool setHeliBladeCollisionsEnabled ( vehicle theVehicle, bool collisions )
OOP Syntax Help! I don't understand this!
- Method: vehicle:setHeliBladeCollisionsEnabled(...)
- Variable: .heliBladeCollisionsEnabled
- Counterpart: getHeliBladeCollisionsEnabled
Required Arguments
- theVehicle: The helicopter that will have the blades collisions set.
- collisions: The state of the helicopter blades collisions.
Returns
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.
Example
Click to collapse [-]
ClientThis 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
- areVehicleLightsOn
- getHeliBladeCollisionsEnabled
- getHelicopterRotorSpeed
- getVehicleAdjustableProperty
- getVehicleComponentPosition
- getVehicleComponentRotation
- getVehicleComponents
- getVehicleComponentScale
- getVehicleComponentVisible
- getVehicleCurrentGear
- getVehicleDummyPosition
- getVehicleGravity
- getVehicleLandingGearDown
- getVehicleModelDummyDefaultPosition
- getVehicleModelDummyPosition
- getVehicleModelExhaustFumesPosition
- getVehicleModelWheelSize
- getVehicleNitroCount
- getVehicleNitroLevel
- getVehicleWheelFrictionState
- getVehicleWheelScale
- isTrainChainEngine
- isVehicleNitroActivated
- isVehicleNitroRecharging
- isVehicleOnGround
- isVehicleWheelOnGround
- isVehicleWindowOpen
- resetVehicleComponentPosition
- resetVehicleComponentRotation
- resetVehicleComponentScale
- resetVehicleDummyPositions
- setHeliBladeCollisionsEnabled
- setHelicopterRotorSpeed
- setVehicleAdjustableProperty
- setVehicleComponentPosition
- setVehicleComponentRotation
- setVehicleComponentScale
- setVehicleComponentVisible
- setVehicleDummyPosition
- setVehicleGravity
- setVehicleLandingGearDown
- setVehicleModelDummyPosition
- setVehicleModelExhaustFumesPosition
- setVehicleModelWheelSize
- setVehicleNitroActivated
- setVehicleNitroCount
- setVehicleNitroLevel
- setVehicleWheelScale
- setVehicleWheelStates
- setVehicleWindowOpen
- Shared
- addVehicleUpgrade
- attachTrailerToVehicle
- blowVehicle
- createVehicle
- detachTrailerFromVehicle
- fixVehicle
- getOriginalHandling
- getTrainDirection
- getTrainPosition
- getTrainSpeed
- getTrainTrack
- getVehicleColor
- getVehicleCompatibleUpgrades
- getVehicleController
- getVehicleDoorOpenRatio
- getVehicleDoorState
- getVehicleEngineState
- getVehicleHandling
- getVehicleHeadLightColor
- getVehicleLandingGearDown
- getVehicleLightState
- getVehicleMaxPassengers
- getVehicleModelFromName
- getVehicleName
- getVehicleNameFromModel
- getVehicleOccupant
- getVehicleOccupants
- getVehicleOverrideLights
- getVehiclePaintjob
- getVehiclePanelState
- getVehiclePlateText
- getVehicleSirenParams
- getVehicleSirens
- getVehicleSirensOn
- getVehicleTowedByVehicle
- getVehicleTowingVehicle
- getVehicleTurretPosition
- getVehicleType
- getVehicleUpgradeOnSlot
- getVehicleUpgradeSlotName
- getVehicleUpgrades
- getVehicleVariant
- getVehicleWheelStates
- isTrainDerailable
- isTrainDerailed
- isVehicleBlown
- isVehicleDamageProof
- isVehicleFuelTankExplodable
- isVehicleLocked
- isVehicleOnGround
- isVehicleTaxiLightOn
- removeVehicleUpgrade
- setTrainDerailable
- setTrainDerailed
- setTrainDirection
- setTrainPosition
- setTrainSpeed
- setTrainTrack
- setVehicleColor
- setVehicleDamageProof
- setVehicleDoorOpenRatio
- setVehicleDoorState
- setVehicleDoorsUndamageable
- setVehicleEngineState
- setVehicleFuelTankExplodable
- setVehicleHandling
- setVehicleHeadLightColor
- setVehicleLandingGearDown
- setVehicleLightState
- setVehicleLocked
- setVehicleOverrideLights
- setVehiclePaintjob
- setVehiclePanelState
- setVehiclePlateText
- setVehicleSirens
- setVehicleSirensOn
- setVehicleTaxiLightOn
- setVehicleTurretPosition
- setVehicleVariant
- setVehicleWheelStates