GetVehicleLightState

From Multi Theft Auto: Wiki

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

FROM VERSION 1.5.7 r19626 ONWARDS
FROM VERSION 1.6 r7485 ONWARDS
FROM VERSION 1.6 r7485 ONWARDS