Vehicle::getColorRGB: Difference between revisions
m (Andrew moved page Vehicle::getColourRGB to Vehicle::getColorRGB) |
No edit summary |
||
| Line 3: | Line 3: | ||
==Syntax== | ==Syntax== | ||
<syntaxhighlight lang="javascript"> | <syntaxhighlight lang="javascript"> | ||
Array vehicle. | Array vehicle.getColorRGB(int slot); | ||
</syntaxhighlight> | </syntaxhighlight> | ||
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.getColorRGB(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 ]