Vehicle::getNeonLightsColour: Difference between revisions

From RAGE Multiplayer Wiki
m (written a example for this!)
No edit summary
Line 1: Line 1:
Gets the color of the neon lights of the specified vehicle.<br><br>See _SET_VEHICLE_NEON_LIGHTS_COLOUR (0x8E0A582209A62695) for more information
Gets the color of the neon lights of the specified vehicle.
 
==Syntax==
==Syntax==
<syntaxhighlight lang="javascript">vehicle.getNeonLightsColor(r, g, b); //EDITED because of spelling mistake. it's called color not colour! </syntaxhighlight>
<pre>vehicle.getNeonLightsColor(r, g, b);</pre>
 
=== Required Arguments ===
=== Required Arguments ===
*'''r:''' int
*'''r:''' int
*'''g:''' int
*'''g:''' int
*'''b:''' int
*'''b:''' int
===Return value===
===Return value===
*'''object:''' r, g, b
*'''object:''' r, g, b
==Example==
==Example==
<syntaxhighlight lang="javascript">
<pre>
 
// To do
//This command returns the color of the neon if its build in.
</pre>


mp.events.addCommand("neontest", (player) => {
let vehicle = player.vehicle;
        if (!!vehicle) {
let [r, g, b] = vehicle.getNeonColor();
player.outputChatBox(`R <b>${r}</b>; G <b>${g}</b>; B <b>${b}</b>`);
};
});
</syntaxhighlight>
==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 07:25, 5 February 2019

Gets the color of the neon lights of the specified vehicle.

Syntax

vehicle.getNeonLightsColor(r, g, b);

Required Arguments

  • r: int
  • g: int
  • b: int

Return value

  • object: r, g, b

Example

// To do

See also