Vehicle::getColorRGB: Difference between revisions
m (Andrew moved page Vehicle::getColourRGB to Vehicle::getColorRGB) |
|||
| (One intermediate revision by one other user not shown) | |||
| Line 3: | Line 3: | ||
==Syntax== | ==Syntax== | ||
<syntaxhighlight lang="javascript"> | <syntaxhighlight lang="javascript"> | ||
Array vehicle. | Array vehicle.getColorRGB(int slot); | ||
</syntaxhighlight> | </syntaxhighlight> | ||
| 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 ]