Vehicle::getNeonLightsColour

From RAGE Multiplayer Wiki
Revision as of 19:25, 4 February 2019 by Exquiisite2k19 (talk | contribs) (written a example for this!)

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

See _SET_VEHICLE_NEON_LIGHTS_COLOUR (0x8E0A582209A62695) for more information

Syntax

vehicle.getNeonLightsColor(r, g, b); //EDITED because of spelling mistake. it's called color not colour!

Required Arguments

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

Return value

  • object: r, g, b

Example

//This command returns the color of the neon if its build in.

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>`);
	};
});

See also