SetVehicleRotorState: Difference between revisions
Jump to navigation
Jump to search
(Created page with "__NOTOC__ {{Client function}} {{New feature/item|3.0161|1.6.0|22862| Turns the rotor on/off for an plane or helicopter. A vehicle with the rotor turned off cannot hover in the air.}} {{Note|The function should not be confused with setVehicleEngineState.}} ==Syntax== <syntaxhighlight lang="lua"> bool setVehicleRotorState(vehicle theVehicle, bool state [, bool stopRotor = true ] ) </syntaxhighlight> {{OOP||vehicle:setRotorState|rotorState|getRotorState}} ===Requ...") |
m (→Example) |
||
(4 intermediate revisions by the same user not shown) | |||
Line 10: | Line 10: | ||
bool setVehicleRotorState(vehicle theVehicle, bool state [, bool stopRotor = true ] ) | bool setVehicleRotorState(vehicle theVehicle, bool state [, bool stopRotor = true ] ) | ||
</syntaxhighlight> | </syntaxhighlight> | ||
{{OOP||[[vehicle]]:setRotorState|rotorState| | {{OOP||[[vehicle]]:setRotorState|rotorState|getVehicleRotorState}} | ||
===Required Arguments=== | ===Required Arguments=== | ||
Line 17: | Line 17: | ||
===Optional Arguments=== | ===Optional Arguments=== | ||
*'''stopRotor:''' Specifies whether the rotor should be stopped after being turned off. If | *'''stopRotor:''' Specifies whether the rotor should be stopped after being turned off. If false, the rotor will continue spinning at a constant speed (it won't slow down or accelerate). It will also not be able to lift off the ground. You can also use [[setVehicleRotorSpeed]] to manage the rotor speed. | ||
===Returns=== | ===Returns=== | ||
Line 23: | Line 23: | ||
==Example== | ==Example== | ||
{{Needs Example}} | |||
==See Also== | ==See Also== | ||
{{Client vehicle functions}} | {{Client vehicle functions}} |
Latest revision as of 02:24, 31 December 2024
Syntax
bool setVehicleRotorState(vehicle theVehicle, bool state [, bool stopRotor = true ] )
OOP Syntax Help! I don't understand this!
- Method: vehicle:setRotorState(...)
- Variable: .rotorState
- Counterpart: getVehicleRotorState
Required Arguments
- theVehicle: The vehicle (helicopter or plane) whose rotor you want to toggle.
- state: The rotor state, which determines whether it should be on (true) or off (false).
Optional Arguments
- stopRotor: Specifies whether the rotor should be stopped after being turned off. If false, the rotor will continue spinning at a constant speed (it won't slow down or accelerate). It will also not be able to lift off the ground. You can also use setVehicleRotorSpeed to manage the rotor speed.
Returns
Returns true if successful, false otherwise.
Example
Script Example Missing Function SetVehicleRotorState needs a script example, help out by writing one. | |
Before submitting check out Editing Guidelines Script Examples. |
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
- setVehicleNitroCount
- setVehicleNitroLevel
- setVehicleWheelScale
- setVehicleWheelStates
- setVehicleWindowOpen
- Shared
- addVehicleUpgrade
- addVehicleSirens
- attachTrailerToVehicle
- blowVehicle
- createVehicle
- detachTrailerFromVehicle
- fixVehicle
- getOriginalHandling
- getTrainDirection
- getTrainPosition
- getTrainSpeed
- getTrainTrack
- getVehicleColor
- getVehicleCompatibleUpgrades
- getVehicleController
- getVehicleDoorOpenRatio
- getVehicleDoorState
- getVehicleEngineState
- getVehicleHandling
- getVehicleHeadLightColor
- getVehicleLandingGearDown
- getVehicleLightState
- getVehicleMaxPassengers
- getVehicleModelFromName
- getVehicleName
- getVehicleNameFromModel
- setVehicleNitroActivated
- 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
- removeVehicleSirens
- 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