Vehicle::setNeonColour: Difference between revisions

From RAGE Multiplayer Wiki
(Created page with "This function used for set vehicle RGB neon color. ==Syntax== <syntaxhighlight lang="javascript"> void vehicle.setNeonColour(int r, int g, int b); </syntaxhighlight> ===Req...")
 
mNo edit summary
Line 7: Line 7:


===Required Arguments===
===Required Arguments===
*'''r:''' Red color in diapason 0 - 255.
*'''r:''' Red color in range of 0 - 255.
*'''g:''' Green color in diapason 0 - 255.
*'''g:''' Green color in range of 0 - 255.
*'''b:''' Blue color in diapason 0 - 255.
*'''b:''' Blue color in range of 0 - 255.


==Example==  
==Example==  

Revision as of 15:34, 5 June 2017

This function used for set vehicle RGB neon color.

Syntax

void vehicle.setNeonColour(int r, int g, int b);

Required Arguments

  • r: Red color in range of 0 - 255.
  • g: Green color in range of 0 - 255.
  • b: Blue color in range of 0 - 255.

Example

That's example set yellow neon colour.

mp.events.addCommand(`yay!`, 
	(player) => {
		let vehicle = player.vehicle;
		if (!!vehicle) {
			vehicle.setNeonColour(255, 255, 0); //255, 255, 0 - it's a Yellow, yep
		};
	}
);

See Also

Template:Vehicle block