natives.changeCarColour

From GTA Connected
Jump to navigation Jump to search

Function Client Only icon-iv.png Online and Offline

Available since Client 1.0.0

void natives.changeCarColour(Vehicle vehicle, int primaryColor, int secondaryColor)

The natives.changeCarColour function is used to Change the primary and secondary colors of a vehicle.

Parameters

1) Vehicle vehicle The vehicle.
2) int primaryColor The primary color index.
3) int secondaryColor The secondary color index.

Return

void This function doesn't return a value.

Notes

  • Color indices usually range from 0 to 133 in GTA IV.

Examples

Example 1 - JavaScript:

addCommandHandler("color", function(command, params, client) {

   if (localPlayer && localPlayer.vehicle) { 
       natives.changeCarColour(localPlayer.vehicle, 1, 2); 
   } 

});

Compatibility

There isn't any compatibility information for this function.