Vehicle::getColorRGB: Difference between revisions
No edit summary |
|||
| Line 11: | Line 11: | ||
==Example== | ==Example== | ||
<syntaxhighlight lang="javascript"> | <syntaxhighlight lang="javascript"> | ||
let primaryColor = vehicle. | let primaryColor = vehicle.getColorRGB(0); | ||
let secondaryColor = vehicle. | let secondaryColor = vehicle.getColorRGB(1); | ||
// primaryColor output: [ 255, 0, 0 ] | // primaryColor output: [ 255, 0, 0 ] | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Latest revision as of 16:48, 15 January 2018
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.getColorRGB(0);
let secondaryColor = vehicle.getColorRGB(1);
// primaryColor output: [ 255, 0, 0 ]