GetVehicleLightState: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
(Extended description of 'light' argument.) |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
__NOTOC__ | |||
{{Server client function}} | {{Server client function}} | ||
This function returns the current state of the specified light on the vehicle. | This function returns the current state of the specified light on the vehicle. | ||
==Syntax== | ==Syntax== | ||
<syntaxhighlight lang="lua">int getVehicleLightState ( vehicle theVehicle, int light )</syntaxhighlight> | <syntaxhighlight lang="lua">int getVehicleLightState ( vehicle theVehicle, int light )</syntaxhighlight> | ||
{{OOP||[[vehicle]]:getLightState||setVehicleLightState}} | |||
==Required Arguments== | ==Required Arguments== | ||
*'''theVehicle:''' | *'''theVehicle:''' the [[vehicle]] that you wish to know the light state of. | ||
*'''light:''' A whole number | *'''light:''' A whole number determining the individual light: | ||
**'''0:''' Front left | |||
**'''1:''' Front right | |||
**'''2:''' Rear right | |||
**'''3:''' Rear left | |||
==Returns== | ==Returns== |
Latest revision as of 21:56, 15 June 2018
This function returns the current state of the specified light on the vehicle.
Syntax
int getVehicleLightState ( vehicle theVehicle, int light )
OOP Syntax Help! I don't understand this!
- Method: vehicle:getLightState(...)
- Counterpart: setVehicleLightState
Required Arguments
- theVehicle: the vehicle that you wish to know the light state of.
- light: A whole number determining the individual light:
- 0: Front left
- 1: Front right
- 2: Rear right
- 3: Rear left
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