RU/getHelicopterRotorSpeed
Jump to navigation
Jump to search
Retrieves the speed at which the rotor of a helicopter rotates.
Syntax
float getHelicopterRotorSpeed ( vehicle heli )
OOP Syntax Help! I don't understand this!
- Method: vehicle:getHelicopterRotorSpeed(...)
- Variable: .helicopterRotorSpeed
- Counterpart: setHelicopterRotorSpeed
Required Arguments
- heli: the helicopter element to get the rotor speed of.
Returns
Returns the rotor speed if successful. This is 0 when the helicopter is parked, and about 0.2 when it is fully spun up. It can be negative if the rotor rotates counter-clockwise. Returns false in case of failure (an invalid element or a vehicle element that is not a helicopter was passed).
Примеры
В этом примере, при вводе команды grs пилотом или пассажиром вертолета, мы получаем скорость вращения лопастей и выводим в чат.
Click to collapse [-]
Clientfunction rotorSpeed() local theVehicle = getPedOccupiedVehicle (localPlayer) if theVehicle then local controller = getVehicleController (theVehicle) if controller == localPlayer then local vehecileType = getVehicleType(theVehicle) if vehecileType == "Helicopter" then outputChatBox("You helicopter roto speed "..math.ceil(getHelicopterRotorSpeed(theVehicle)),0,255,0) end end end end addCommandHandler("grs",rotorSpeed)
Смотрите также
- addVehicleUpgrade
- attachTrailerToVehicle
- RU/blowVehicle
- createVehicle
- detachTrailerFromVehicle
- RU/fixVehicle
- RU/getHeliBladeCollisionsEnabled
- RU/getHelicopterRotorSpeed
- RU/getOriginalHandling
- getTrainDirection
- getTrainPosition
- getTrainSpeed
- getTrainTrack
- getVehicleAdjustableProperty
- RU/getVehicleColor
- getVehicleCompatibleUpgrades
- getVehicleComponents
- getVehicleComponentPosition
- getVehicleComponentRotation
- getVehicleComponentVisible
- RU/getVehicleController
- getVehicleDoorOpenRatio
- getVehicleDoorState
- getVehicleEngineState
- getVehicleGravity
- RU/getVehicleHandling
- getVehicleHeadLightColor
- getVehicleLandingGearDown
- getVehicleLightState
- RU/getVehicleMaxPassengers
- RU/getVehicleModelFromName
- RU/getVehicleName
- RU/getVehicleNameFromModel
- getVehicleNitroCount
- getVehicleNitroLevel
- RU/getVehicleOccupant
- RU/getVehicleOccupants
- getVehicleCurrentGear
- getVehicleOverrideLights
- getVehiclePaintjob
- getVehiclePanelState
- getVehiclePlateText
- getVehicleSirens
- getVehicleSirensOn
- getVehicleSirenParams
- getVehicleTowedByVehicle
- getVehicleTowingVehicle
- getVehicleTurnVelocity
- getVehicleTurretPosition
- getVehicleType
- getVehicleUpgradeOnSlot
- getVehicleUpgrades
- getVehicleUpgradeSlotName
- getVehicleVariant
- getVehicleWheelStates
- isTrainChainEngine
- isTrainDerailable
- isTrainDerailed
- isVehicleBlown
- isVehicleDamageProof
- isVehicleFuelTankExplodable
- isVehicleLocked
- isVehicleNitroRecharging
- isVehicleNitroActivated
- isVehicleOnGround
- isVehicleTaxiLightOn
- isVehicleWindowOpen
- removeVehicleUpgrade
- resetVehicleComponentPosition
- resetVehicleComponentRotation
- setHeliBladeCollisionsEnabled
- setHelicopterRotorSpeed
- setVehicleAdjustableProperty
- setVehicleColor
- setVehicleComponentPosition
- setVehicleComponentRotation
- setVehicleComponentVisible
- setVehicleDamageProof
- setVehicleDirtLevel
- setVehicleDoorOpenRatio
- setVehicleDoorState
- setVehicleDoorsUndamageable
- setVehicleEngineState
- setVehicleFuelTankExplodable
- setVehicleGravity
- setVehicleHeadLightColor
- setVehicleLandingGearDown
- setVehicleLightState
- setVehicleLocked
- setVehicleNitroActivated
- setVehicleNitroCount
- setVehicleNitroLevel
- setVehicleOverrideLights
- setVehiclePaintjob
- setVehiclePanelState
- setVehiclePlateText
- setVehicleSirens
- setVehicleSirensOn
- setVehicleTurretPosition
- setVehicleTaxiLightOn
- setVehicleTurnVelocity
- setVehicleWheelStates
- setVehicleWindowOpen
- setTrainDerailable
- setTrainDerailed
- setTrainDirection
- setTrainPosition
- setTrainSpeed