Vehicle::setColor: Difference between revisions

From RAGE Multiplayer Wiki
No edit summary
No edit summary
Line 11: Line 11:


==Example==  
==Example==  
no example, ez
<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

Revision as of 05:49, 24 October 2017

This function used for set vehicle body color.

Syntax

void vehicle.setColour(int colour1, int colour2);

Required Arguments

  • colour1: Primary color.
  • colour2: Secondary color.

Example

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

See Also

Template:Vehicle block