GetVehicleLightState: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
{{Server client function}}
__NOTOC__
__NOTOC__
This function returns the current state of the specifed light on the vehicle.
This function returns the current state of the specified light on the vehicle.


==Syntax==
==Syntax==
<syntaxhighlight lang="lua">getVehicleLightState ( vehicle, light )</syntaxhighlight>
<syntaxhighlight lang="lua">getVehicleLightState ( vehicle theVehicle, int light )</syntaxhighlight>


==Required Arguments==
==Required Arguments==
*'''Vehicle:''' A handle to the [[vehicle]] that you wish to know the light state of.
*'''theVehicle:''' A handle to the [[vehicle]] that you wish to know the light state of.
*'''Light:''' A whole number between 0 and 3
*'''light:''' A whole number between 0 and 3


==Returns==
==Returns==

Revision as of 17:28, 17 August 2007

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

Syntax

getVehicleLightState ( vehicle theVehicle, int light )

Required Arguments

  • theVehicle: A handle to the vehicle that you wish to know the light state of.
  • light: A whole number between 0 and 3

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

Shared