GetVehicleDoorState: Difference between revisions
Jump to navigation
Jump to search
(→Syntax) |
|||
Line 8: | Line 8: | ||
==Required Arguments== | ==Required Arguments== | ||
*'''theVehicle:''' A handle to the [[vehicle]] that you wish to know the door state of. | *'''theVehicle:''' A handle to the [[vehicle]] that you wish to know the door state of. | ||
*'''Door:''' A whole number, 0 (hood), 1 ( | *'''Door:''' A whole number, 0 (hood), 1 (trunk), 2 (front left), 3 (front right), 4 (rear left), 5 (rear right) | ||
==Returns== | ==Returns== |
Revision as of 14:03, 15 August 2007
This function returns the current state of a specifed door on the vehicle.
Syntax
int getVehicleDoorState ( vehicle theVehicle, int door )
Required Arguments
- theVehicle: A handle to the vehicle that you wish to know the door state of.
- Door: A whole number, 0 (hood), 1 (trunk), 2 (front left), 3 (front right), 4 (rear left), 5 (rear right)
Returns
Returns 4 ints indicating the states of the door. These values can be:
- 0: Shut (Undamaged)
- 1: Open (Undamaged)
- 2: Shut (Damaged)
- 3: Open (Damaged)
- 4: Fallen off
Example
local newcar = createVehicle ( 520, 1024, 1024, 1024 ) local state = getVehicleDoorState ( newcar, 2 ) outputChatBox ( "The 3rd door state on this car: " .. state )
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