getVehicleLightState | Multi Theft Auto: Wiki Skip to content

getVehicleLightState

Client-side
Server-side
Shared

Pair: setVehicleLightState

Manual Review Required

Please finish this page using the corresponding Old Wiki article. Go to Contribution guidelines for more information.


This function returns the current state of the specified light on the vehicle.

OOP Syntax Help! I don't understand this!

  • Method:vehicle:getLightState(...)

Syntax

int getVehicleLightState ( vehicle theVehicle, int light )
Required Arguments
  • theVehicle: MISSING_PARAM_DESC
  • light: MISSING_PARAM_DESC

Returns

  • int: value

Returns 0 (working) or 1 (broken)

Code Examples

shared
newcar = createVehicle ( 520, 1024, 1024, 1024 )
state = getVehicleLightState ( newcar, 0 )
outputChatBox ( "The front-left light state on this car: " .. state )

See Also

Vehicle Functions