RedM Natives

GET_VEHICLE_COLOURS

Hash0x40D82D88
Runtime nameGetVehicleColours
NamespaceCFX
SideServer
NameOfficial
Docs

Signature

void GET_VEHICLE_COLOURS(Vehicle vehicle, int* colorPrimary, int* colorSecondary);

Parameters

NameTypeDescription
vehicleVehicle—
colorPrimaryint*—
colorSecondaryint*—

Returns void

Usage

Lua
local colorPrimary, colorSecondary = GetVehicleColours(vehicle)

-- always works, by hash
local colorPrimary, colorSecondary = Citizen.InvokeNative(0x40d82d88, vehicle, Citizen.PointerValueInt(), Citizen.PointerValueInt())
JavaScript and C#
JavaScript
const [colorPrimary, colorSecondary] = GetVehicleColours(vehicle);

// by hash
const [colorPrimary, colorSecondary] = Citizen.invokeNative('0x40d82d88', vehicle, Citizen.pointerValueInt(), Citizen.pointerValueInt());
C#
var colorPrimary = new OutputArgument();
var colorSecondary = new OutputArgument();
Function.Call((Hash)0x40d82d88, vehicle, colorPrimary, colorSecondary);
// colorPrimary.GetResult<int>()
// colorSecondary.GetResult<int>()
  • Pointer (out) arguments are not passed in Lua/JS: their values are returned after the result, in order.

See also

Sources

Cfx.re native reference

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