Vehicle::getColorRGB: Difference between revisions

From RAGE Multiplayer Wiki
(Created page with "This function used to get the vehicle RGB body color. '''Returns null if never set explicitly'''. ==Syntax== <syntaxhighlight lang="javascript"> Array vehicle.getColourRGB(in...")
 
(No difference)

Revision as of 19:18, 25 December 2017

This function used to get the vehicle RGB body color. Returns null if never set explicitly.

Syntax

Array vehicle.getColourRGB(int slot);

Required Arguments

  • slot: The color you want to get. (valid is 0 or 1)

Example

let primaryColor = vehicle.getColourRGB(0);
let secondaryColor = vehicle.getColourRGB(1); 
// primaryColor output: [ 255, 0, 0 ]

See Also

Template:Vehicle block