SetVehicleWheelsRotation: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
(updated) |
||
Line 7: | Line 7: | ||
bool setVehicleWheelsRotation ( vehicle vehicleElement, float rotation ) | bool setVehicleWheelsRotation ( vehicle vehicleElement, float rotation ) | ||
</syntaxhighlight> | </syntaxhighlight> | ||
{{OOP||[[vehicle]]:setVehicleWheelsRotation|vehicleWheelsRotation| | {{OOP||[[vehicle]]:setVehicleWheelsRotation|vehicleWheelsRotation|getVehicleComponentRotation}} | ||
===Required Arguments=== | ===Required Arguments=== |
Revision as of 05:30, 30 June 2024
Allows the scripter to manipulate wheel rotation for vehicles. This function supports Automobiles, Bikes (Including BMX), and Trailers.
Syntax
bool setVehicleWheelsRotation ( vehicle vehicleElement, float rotation )
OOP Syntax Help! I don't understand this!
- Method: vehicle:setVehicleWheelsRotation(...)
- Variable: .vehicleWheelsRotation
- Counterpart: getVehicleComponentRotation
Required Arguments
- vehicleElement: the vehicle (Automobile, Bike, or Trailer) whose wheel rotation is to be set.
- rotation: the new wheel rotation value.
Returns
Returns true if successful, false otherwise.
Example
This example sets the wheel rotation of the vehicle the player is in, and also for any attached trailer.
Click to collapse [-]
ClientaddEventHandler("onClientVehicleEnter", getRootElement(), function() local theVeh = getPedOccupiedVehicle(localPlayer) if setVehicleWheelsRotation(theVeh, 0) then outputChatBox("SET OK") else outputChatBox("SET FAILED") end end ) addEventHandler("onClientPreRender", root, function() local theVeh = getPedOccupiedVehicle(localPlayer) if theVeh then setVehicleWheelsRotation(theVeh, 0) -- also do it for trailer local trailer = getVehicleTowedByVehicle(theVeh) if trailer then setVehicleWheelsRotation(trailer, 0) end end end)
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