From Multi Theft Auto: Wiki
Jump to navigation Jump to search

This function sets the state of the light on the vehicle.


bool setVehicleLightState ( vehicle theVehicle, int light, int state )

OOP Syntax Help! I don't understand this!

Method: vehicle:setLightState(...)
Counterpart: getVehicleLightState

Required Arguments

  • theVehicle: A handle to the vehicle that you wish to change the light state of.
  • light: A whole number determining the individual light:
    • 0: Front left
    • 1: Front right
    • 2: Rear right
    • 3: Rear left
  • state: A whole number determining the new state of the light. 0 represents normal lights, and 1 represents broken lights.


Returns true if the light state was set successfully, false if invalid arguments were passed to the function.


newcar = createVehicle ( 520, 1024, 1024, 1024 )   -- create a new vehicle
state = setVehicleLightState ( newcar, 0,  1 )     -- break the left front light

See Also