Vehicle::setColor: Difference between revisions

From RAGE Multiplayer Wiki
No edit summary
mNo edit summary
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
This function used for set vehicle body color.
'''Function''': sets vehicle body color. ([[Vehicle_Colors|Vehicle colors]])
 
==Syntax==
==Syntax==
<syntaxhighlight lang="javascript">
<syntaxhighlight lang="javascript">
void vehicle.setColour(int colour1, int colour2);
vehicle.setColor(primaryColor, secondaryColor);
</syntaxhighlight>  
</syntaxhighlight>  


===Required Arguments===
===Parameters===
*'''colour1:''' Primary color.
*'''primaryColor:''' {{RageType|Int}}
*'''colour2:''' Secondary color.
*'''secondaryColor:''' {{RageType|Int}}


==Example==  
==Example==  
<syntaxhighlight lang="javascript">
<syntaxhighlight lang="javascript">
var theVehicle = mp.vehicles.new(418536135, new mp.Vector3(-17.460, 39.787, 71.318)); // spawn Infernus
var theVehicle = mp.vehicles.new(418536135, new mp.Vector3(-17.460, 39.787, 71.318)); // spawn Infernus
theVehicle.setColour(0,0); // set black colour
theVehicle.setColor(0,0); // set black colour
</syntaxhighlight>
</syntaxhighlight>


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

Latest revision as of 08:03, 23 September 2018

Function: sets vehicle body color. (Vehicle colors)

Syntax

vehicle.setColor(primaryColor, secondaryColor);

Parameters

  • primaryColor: Int
  • secondaryColor: Int

Example

var theVehicle = mp.vehicles.new(418536135, new mp.Vector3(-17.460, 39.787, 71.318)); // spawn Infernus
theVehicle.setColor(0,0); // set black colour

See Also