setVehicleModColor1
SET_VEHICLE_MOD_COLOR_10x43FEB945EE7F85B8The 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.
setVehicleModColor1(
vehicle: Vehicle,
paintType: number,
color: number,
pearlescentColor: number
): voidsetVehicleModColor1(
vehicle: Vehicle,
paintType: integer,
color: integer,
pearlescentColor: integer
)Usage
JavaScript
setVehicleModColor1(vehicle, paintType, color, pearlescentColor);Lua
setVehicleModColor1(vehicle, paintType, color, pearlescentColor)Parameters
| Parameter | Type | JavaScript | Lua | Description |
|---|---|---|---|---|
vehicle | Vehicle | number | integer | |
paintType | int | number | integer | |
color | int | number | integer | number of the color. |
pearlescentColor | int | number | integer |
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