GET_VEHICLE_COLOURS
Signature
void GET_VEHICLE_COLOURS(Vehicle vehicle, int* colorPrimary, int* colorSecondary);Parameters
| Name | Type | Description |
|---|---|---|
vehicle | Vehicle | — |
colorPrimary | int* | — |
colorSecondary | int* | — |
Returns void
Usage
local colorPrimary, colorSecondary = GetVehicleColours(vehicle)
-- always works, by hash
local colorPrimary, colorSecondary = Citizen.InvokeNative(0x40d82d88, vehicle, Citizen.PointerValueInt(), Citizen.PointerValueInt())JavaScript and C#
const [colorPrimary, colorSecondary] = GetVehicleColours(vehicle);
// by hash
const [colorPrimary, colorSecondary] = Citizen.invokeNative('0x40d82d88', vehicle, Citizen.pointerValueInt(), Citizen.pointerValueInt());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
SET_VEHICLE_COLOURScolorPrimary & colorSecondary are the paint indexes for the vehicle.
Sources
Something wrong or missing? Contribute a verified note — corrections ship through pull requests.