RedM Natives

GET_VEHICLE_CUSTOM_PRIMARY_COLOUR

Hash0x1C2B9FEF
Runtime nameGetVehicleCustomPrimaryColour
NamespaceCFX
SideServer
NameOfficial
Docs

Signature

void GET_VEHICLE_CUSTOM_PRIMARY_COLOUR(Vehicle vehicle, int* r, int* g, int* b);

Parameters

NameTypeDescription
vehicleVehicle—
rint*—
gint*—
bint*—

Returns void

Usage

Lua
local r, g, b = GetVehicleCustomPrimaryColour(vehicle)

-- always works, by hash
local r, g, b = Citizen.InvokeNative(0x1c2b9fef, vehicle, Citizen.PointerValueInt(), Citizen.PointerValueInt(), Citizen.PointerValueInt())
JavaScript and C#
JavaScript
const [r, g, b] = GetVehicleCustomPrimaryColour(vehicle);

// by hash
const [r, g, b] = Citizen.invokeNative('0x1c2b9fef', vehicle, Citizen.pointerValueInt(), Citizen.pointerValueInt(), Citizen.pointerValueInt());
C#
var r = new OutputArgument();
var g = new OutputArgument();
var b = new OutputArgument();
Function.Call((Hash)0x1c2b9fef, vehicle, r, g, b);
// r.GetResult<int>()
// g.GetResult<int>()
// b.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.