natives.changeCarColour

Revision as of 16:04, 2 December 2025 by ChrisGame20 (talk | contribs) (Created page with "{{ScriptItem |endpoint = client |games = iv |type = function |name = natives.changeCarColour |parameters = Vehicle vehicle, int primaryColor, int secondaryColor |parameter1 = Vehicle vehicle The vehicle |parameter2 = int primaryColor The primary color index |parameter3 = int secondaryColor The secondary color index |usage = Change the primary and secondary colors of a vehicle |notes = Color indices usually range from 0 to 133 in GTA IV |return1 = void |exampleJS = addCom...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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.