GetVehicleLightState: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
==Description== | ==Description== | ||
This function returns the current state of the light on the vehicle. | This function returns the current state of the specifed light on the vehicle. | ||
==Syntax== | ==Syntax== | ||
<syntaxhighlight lang="lua">getVehicleLightState ( vehicle )</syntaxhighlight> | <syntaxhighlight lang="lua">getVehicleLightState ( vehicle, light )</syntaxhighlight> | ||
==Required Arguments== | ==Required Arguments== | ||
*'''Vehicle:''' A handle to the [[vehicle]] that you wish to know the light state of. | *'''Vehicle:''' A handle to the [[vehicle]] that you wish to know the light state of. | ||
*'''Light:''' A whole number between 0 and 3 | |||
==Returns== | ==Returns== | ||
Line 14: | Line 15: | ||
==Example== | ==Example== | ||
<syntaxhighlight lang="lua">newcar = createVehicle ( 520, 1024, 1024, 1024 ) | <syntaxhighlight lang="lua">newcar = createVehicle ( 520, 1024, 1024, 1024 ) | ||
state = getVehicleLightState ( newcar ) | state = getVehicleLightState ( newcar, 0 ) | ||
outputChatBox ( "The light state on this car: " .. state )</syntaxhighlight> | outputChatBox ( "The front-left light state on this car: " .. state )</syntaxhighlight> | ||
==See Also== | ==See Also== | ||
{{Vehicle functions}} | {{Vehicle functions}} |
Revision as of 23:16, 11 June 2006
Description
This function returns the current state of the specifed light on the vehicle.
Syntax
getVehicleLightState ( vehicle, light )
Required Arguments
- Vehicle: A handle to the vehicle that you wish to know the light state of.
- Light: A whole number between 0 and 3
Returns
Returns 0 (working) or 1 (broken)
Example
newcar = createVehicle ( 520, 1024, 1024, 1024 ) state = getVehicleLightState ( newcar, 0 ) outputChatBox ( "The front-left light 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