Vehicle::getNeonColour

From RAGE Multiplayer Wiki
Revision as of 14:15, 19 May 2017 by SalwadoR (talk | contribs) (Created page with "This function used for get vehicle neon color in RGB format. <syntaxhighlight lang="javascript"> void vehicle.getNeonColour(); </syntaxhighlight> '''Return array containing...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

This function used for get vehicle neon color in RGB format.

void vehicle.getNeonColour();

Return array containing colours.

Array content

  • Red color 0 - 255.
  • Green color 0 - 255.
  • Blue color 0 - 255.

Example

That's example just show, how use it.

mp.events.addCommand(`neonich`, 
	(player) => {
		let vehicle = player.vehicle;
		if (!!vehicle) {
			let [r, g, b] = vehicle.getNeonColour();
			player.outputChatBox(`R <b>${r}</b>; G <b>${g}</b>; B <b>${b}</b>`);
		};
	}
);

See Also

Template:Vehicle block