SetVehicleWheelStates: Difference between revisions
Jump to navigation
Jump to search
JonChappell (talk | contribs) mNo edit summary |
No edit summary |
||
Line 5: | Line 5: | ||
==Syntax== | ==Syntax== | ||
<syntaxhighlight lang="lua">setVehicleWheelStates ( vehicle theVehicle, int frontLeft, [ int | <syntaxhighlight lang="lua">setVehicleWheelStates ( vehicle theVehicle, int frontLeft, [ int rearLeft = -1, int frontRight = -1, int rearRight = -1 ])</syntaxhighlight> | ||
==Required Arguments== | ==Required Arguments== | ||
*'''theVehicle:''' A handle to the [[vehicle]] that you wish to change the wheel states of. | *'''theVehicle:''' A handle to the [[vehicle]] that you wish to change the wheel states of. | ||
*'''frontLeft:''' A whole number representing the wheel state (-1 for no change ) | *'''frontLeft:''' A whole number representing the wheel state (-1 for no change) | ||
==Optional Arguments== | ==Optional Arguments== | ||
*''' | *'''rearLeft:''' A whole number representing the wheel state (-1 for no change) | ||
*''' | *'''frontRight:''' A whole number representing the wheel state (-1 for no change) | ||
*'''rearRight:''' A whole number representing the wheel state (-1 for no change ) | *'''rearRight:''' A whole number representing the wheel state (-1 for no change) | ||
==Wheel-State values== | ==Wheel-State values== |
Revision as of 14:56, 1 August 2007
This function sets the state of wheels on the vehicle.
Internally, no vehicles have more than 4 wheels. If they appear to, they will be duplicating other wheels.
Syntax
setVehicleWheelStates ( vehicle theVehicle, int frontLeft, [ int rearLeft = -1, int frontRight = -1, int rearRight = -1 ])
Required Arguments
- theVehicle: A handle to the vehicle that you wish to change the wheel states of.
- frontLeft: A whole number representing the wheel state (-1 for no change)
Optional Arguments
- rearLeft: A whole number representing the wheel state (-1 for no change)
- frontRight: A whole number representing the wheel state (-1 for no change)
- rearRight: A whole number representing the wheel state (-1 for no change)
Wheel-State values
- 0: Inflated
- 1: Flat
- 2: Fallen off
Example
This example creates a new vehicle then punctures its front left wheel.
newcar = createVehicle ( 520, 1024, 1024, 1024 ) state = setVehicleWheelStates ( newcar, 1 ) -- Punctures the front-left wheel on the vehicle
See Also
- 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