SetVehicleDoorState: Difference between revisions
Jump to navigation
Jump to search
(→Syntax) |
No edit summary |
||
Line 7: | Line 7: | ||
==Required Arguments== | ==Required Arguments== | ||
*''' | *'''theVehicle:''' A handle to the [[vehicle]] that you wish to change the door state of. | ||
*'''Door:''' A whole number between 0 and 5. | *'''Door:''' A whole number between 0 and 5. | ||
*'''State:''' A whole number determining the new state of the door. (0: intact, 1: swinging-free 2: bashed, 3: bashed+swinging-free, 4: missing ) | *'''State:''' A whole number determining the new state of the door. (0: intact, 1: swinging-free 2: bashed, 3: bashed+swinging-free, 4: missing ) | ||
==Example== | ==Example== | ||
<syntaxhighlight lang="lua">newcar = createVehicle ( 520, 1024, 1024, 1024 ) | <syntaxhighlight lang="lua">local newcar = createVehicle ( 520, 1024, 1024, 1024 ) | ||
state = setVehicleDoorState ( newcar, 2, 4 ) -- Breaks the front-left door off of a vehicle. | state = setVehicleDoorState ( newcar, 2, 4 ) -- Breaks the front-left door off of a vehicle. | ||
</syntaxhighlight> | </syntaxhighlight> |
Revision as of 16:13, 13 August 2007
This function sets the state of a specified door on the vehicle.
Syntax
setVehicleDoorState ( vehicle theVehice, int door, int state )
Required Arguments
- theVehicle: A handle to the vehicle that you wish to change the door state of.
- Door: A whole number between 0 and 5.
- State: A whole number determining the new state of the door. (0: intact, 1: swinging-free 2: bashed, 3: bashed+swinging-free, 4: missing )
Example
local newcar = createVehicle ( 520, 1024, 1024, 1024 ) state = setVehicleDoorState ( newcar, 2, 4 ) -- Breaks the front-left door off of a 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