Vehicle::getLightsState: Difference between revisions

From RAGE Multiplayer Wiki
(yay)
 
Line 8: Line 8:
*'''object:''' lightsOn, highbeamsOn
*'''object:''' lightsOn, highbeamsOn
==Example==
==Example==
<syntaxhighlight lang="javascript">
 
// todo
let lightState = vehicle.getLightsState(1,1);
</syntaxhighlight>
 
mp.gui.chat.push(`Low Beam: ${lightState.lightsOn}, High Beam: ${lightState.highbeamsOn}`);
 
==See also==
==See also==
{{Vehicle_function_c}}
{{Vehicle_function_c}}
[[Category:Clientside API]]
[[Category:Clientside API]]
[[Category:TODO: Example]]
[[Category:TODO: Example]]

Revision as of 18:15, 6 August 2018

Syntax

vehicle.getLightsState(lightsOn, highbeamsOn);

Required Arguments

  • lightsOn: BOOL
  • highbeamsOn: BOOL

Return value

  • object: lightsOn, highbeamsOn

Example

let lightState = vehicle.getLightsState(1,1);

mp.gui.chat.push(`Low Beam: ${lightState.lightsOn}, High Beam: ${lightState.highbeamsOn}`);

See also