SetVehicleLightState: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 9: Line 9:
*'''theVehicle:''' A handle to the [[vehicle]] that you wish to change the light state of.
*'''theVehicle:''' A handle to the [[vehicle]] that you wish to change the light state of.
*'''light:''' A whole number determining the individual light.
*'''light:''' A whole number determining the individual light.
*'''state:''' A whole number determining the new state of the light. (0: ok, 1: smashed)
*'''state:''' A whole number determining the new state of the light. ''0'' represents normal lights, and ''1'' represents broken lights.


==Example==
==Example==

Revision as of 15:14, 29 August 2007

Description

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

Syntax

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

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.
  • state: A whole number determining the new state of the light. 0 represents normal lights, and 1 represents broken lights.

Example

newcar = createVehicle ( 520, 1024, 1024, 1024 )   -- create a new vehicle
state = setVehicleLightState ( newcar, 0,  1 )     -- break one of its lights

See Also