Vehicle::setColorRGB: Difference between revisions
No edit summary |
No edit summary |
||
| Line 1: | Line 1: | ||
This function used to get the vehicle RGB body color. | This function used to get the vehicle RGB body color. '''Returns null if never set explicitly'''. | ||
==Syntax== | ==Syntax== | ||
<syntaxhighlight lang="javascript"> | <syntaxhighlight lang="javascript"> | ||
Array vehicle.getColourRGB(int slot); | |||
</syntaxhighlight> | </syntaxhighlight> | ||
| Line 13: | Line 13: | ||
let primaryColor = vehicle.getColourRGB(0); | let primaryColor = vehicle.getColourRGB(0); | ||
let secondaryColor = vehicle.getColourRGB(1); | let secondaryColor = vehicle.getColourRGB(1); | ||
// primaryColor output: [ 255, 0, 0 ] | |||
</syntaxhighlight> | </syntaxhighlight> | ||
==See Also== | ==See Also== | ||
{{Vehicle_block}} | {{Vehicle_block}} | ||
Revision as of 17:34, 23 September 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 ]