VehicleClient

setVehicleModColor1

SET_VEHICLE_MOD_COLOR_10x43FEB945EE7F85B8

The GTA V native SET_VEHICLE_MOD_COLOR_1 of the VEHICLE namespace, as LS:MP client scripts call it: the global function setVehicleModColor1, in JavaScript and in Lua.

SignatureJavaScript
setVehicleModColor1(
  vehicle: Vehicle,
  paintType: number,
  color: number,
  pearlescentColor: number
): void
SignatureLua
setVehicleModColor1(
  vehicle: Vehicle,
  paintType: integer,
  color: integer,
  pearlescentColor: integer
)

Usage

JavaScript
setVehicleModColor1(vehicle, paintType, color, pearlescentColor);
Lua
setVehicleModColor1(vehicle, paintType, color, pearlescentColor)

Parameters

ParameterTypeJavaScriptLuaDescription
vehicleVehiclenumberinteger
paintTypeintnumberinteger
colorintnumberintegernumber of the color.
pearlescentColorintnumberinteger

Returns

Nothing. In JavaScript the call evaluates to undefined.

Notes

From the community native database. Names are LS:MP’s; samples may be written for C++ or another framework.

paintType:
0: Normal
1: Metallic
2: Pearl
3: Matte
4: Metal
5: Chrome
6: Chameleon

p3 seems to always be 0.

Full list of vehicle colors and vehicle plates by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/vehicleColors.json

Reference

Namespace
Vehicle VEHICLE
In the game
void SET_VEHICLE_MOD_COLOR_1(Vehicle vehicle, int paintType, int color, int pearlescentColor)
Hash
0x43FEB945EE7F85B8

Open in the interactive natives reference