Vehicle::setColorRGB: Difference between revisions

From RAGE Multiplayer Wiki
No edit summary
No edit summary
Line 1: Line 1:
This function used to get the vehicle RGB body color. '''Returns null if never set explicitly'''.
This function used for set vehicle RGB body color.


==Syntax==
==Syntax==
<syntaxhighlight lang="javascript">
<syntaxhighlight lang="javascript">
Array vehicle.getColourRGB(int slot);
void vehicle.setColourRGB(int r1, int g1, int b1, int r2, int g2, int b2);
</syntaxhighlight>  
</syntaxhighlight>  


===Required Arguments===
===Required Arguments===
*'''slot:''' The color you want to get. (valid is 0 or 1)
*'''r1:''' Primary red color in diapason 0 - 255.
*'''g1:''' Primary green color in diapason 0 - 255.
*'''b1:''' Primary blue color in diapason 0 - 255.
*'''r2:''' Secondary red color in diapason 0 - 255.
*'''g2:''' Secondary green color in diapason 0 - 255.
*'''b2:''' Secondary blue color in diapason 0 - 255.


==Example==  
==Example==  
no example, ez
<syntaxhighlight lang="javascript">
<syntaxhighlight lang="javascript">
let primaryColor = vehicle.getColourRGB(0);
//todo
let secondaryColor = vehicle.getColourRGB(1);
// primaryColor output: [ 255, 0, 0 ]
</syntaxhighlight>
</syntaxhighlight>


==See Also==
==See Also==
{{Vehicle_block}}
{{Vehicle_block}}

Revision as of 17:36, 23 September 2017

This function used for set vehicle RGB body color.

Syntax

void vehicle.setColourRGB(int r1, int g1, int b1, int r2, int g2, int b2);

Required Arguments

  • r1: Primary red color in diapason 0 - 255.
  • g1: Primary green color in diapason 0 - 255.
  • b1: Primary blue color in diapason 0 - 255.
  • r2: Secondary red color in diapason 0 - 255.
  • g2: Secondary green color in diapason 0 - 255.
  • b2: Secondary blue color in diapason 0 - 255.

Example

no example, ez

//todo

See Also

Template:Vehicle block