Vehicle::getColorRGB

From RAGE Multiplayer Wiki
Revision as of 17:36, 23 September 2017 by Austin (talk | contribs) (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...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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