setVehicleColours
SET_VEHICLE_COLOURS0x4F1D4BE3A7F24601The GTA V native SET_VEHICLE_COLOURS of the VEHICLE namespace, as LS:MP client scripts call it: the global function setVehicleColours, in JavaScript and in Lua.
setVehicleColours(
vehicle: Vehicle,
colorPrimary: number,
colorSecondary: number
): voidsetVehicleColours(
vehicle: Vehicle,
colorPrimary: integer,
colorSecondary: integer
)Usage
JavaScript
setVehicleColours(vehicle, colorPrimary, colorSecondary);Lua
setVehicleColours(vehicle, colorPrimary, colorSecondary)Parameters
| Parameter | Type | JavaScript | Lua |
|---|---|---|---|
vehicle | Vehicle | number | integer |
colorPrimary | int | number | integer |
colorSecondary | 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.
colorPrimary & colorSecondary are the paint index for the vehicle.
For a list of valid paint indexes, view: https://pastebin.com/pwHci0xK
Note: minimum color index is 0, maximum color index is (numColorIndices - 1)
Full list of vehicle colors by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/vehicleColors.json
Reference
- Namespace
- Vehicle VEHICLE
- In the game
void SET_VEHICLE_COLOURS(Vehicle vehicle, int colorPrimary, int colorSecondary)- Hash
0x4F1D4BE3A7F24601