setVehicleLightState | Multi Theft Auto: Wiki Skip to content

setVehicleLightState

Client-side
Server-side
Shared

Pair: getVehicleLightState

Manual Review Required

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


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

OOP Syntax Help! I don't understand this!

  • Method:vehicle:setLightState(...)

Syntax

bool setVehicleLightState ( vehicle theVehicle, int light, int state )
Required Arguments
  • theVehicle: MISSING_PARAM_DESC
  • light: MISSING_PARAM_DESC
  • state: MISSING_PARAM_DESC

Returns

  • bool: value

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

Code Examples

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

See Also

Vehicle Functions