SetVehicleDoorState: Difference between revisions
Jump to navigation
Jump to search
m (→Syntax) |
|||
Line 10: | Line 10: | ||
==Required Arguments== | ==Required Arguments== | ||
*'''theVehicle:''' The [[vehicle]] that you wish to change the door state of. | *'''theVehicle:''' The [[vehicle]] that you wish to change the door state of. | ||
*'''door:''' | *'''door:''' A whole number, 0 (hood), 1 (trunk), 2 (front left), 3 (front right), 4 (rear left), 5 (rear right) | ||
*'''state:''' An integer determining the new state of the door: | *'''state:''' An integer determining the new state of the door: | ||
**'''0:''' intact | **'''0:''' intact |
Revision as of 12:05, 9 September 2011
This function sets the damage state of a specified door on a vehicle.
Syntax
bool setVehicleDoorState ( vehicle theVehicle, int door, int state )
Required Arguments
- theVehicle: The vehicle that you wish to change the door state of.
- door: A whole number, 0 (hood), 1 (trunk), 2 (front left), 3 (front right), 4 (rear left), 5 (rear right)
- state: An integer determining the new state of the door:
- 0: intact
- 1: swinging free
- 2: bashed
- 3: bashed and swinging free
- 4: missing
Returns
Returns true if the door state was successfully set, false if invalid arguments, invalid door IDs or invalid state IDs are passed.
Example
-- create a new vehicle local newcar = createVehicle ( 520, 1024, 1024, 1024 ) -- break its front left door off state = setVehicleDoorState ( newcar, 2, 4 )
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