RedM Natives

SET_VEHICLE_COLOURS

colorPrimary & colorSecondary are the paint indexes for the vehicle.

Hash0x57F24253
Runtime nameSetVehicleColours
NamespaceCFX
SideServer
NameOfficial
Docs

Signature

void SET_VEHICLE_COLOURS(Vehicle vehicle, int colorPrimary, int colorSecondary);

Parameters

NameTypeDescription
vehicleVehicle—
colorPrimaryint—
colorSecondaryint—

Returns void

Description

Cfx.re native reference

colorPrimary & colorSecondary are the paint indexes for the vehicle. For a list of valid paint indexes, view: pastebin.com/pwHci0xK

This is the server-side RPC native equivalent of the client native SET_VEHICLE_COLOURS.

Usage

Lua
SetVehicleColours(vehicle, colorPrimary, colorSecondary)

-- always works, by hash
Citizen.InvokeNative(0x57f24253, vehicle, colorPrimary, colorSecondary)
JavaScript and C#
JavaScript
SetVehicleColours(vehicle, colorPrimary, colorSecondary);

// by hash
Citizen.invokeNative('0x57f24253', vehicle, colorPrimary, colorSecondary);
C#
Function.Call((Hash)0x57f24253, vehicle, colorPrimary, colorSecondary);

See also

Sources

Cfx.re native reference

Something wrong or missing? Contribute a verified note — corrections ship through pull requests.