VehicleClient2 outputs

getVehicleColours

GET_VEHICLE_COLOURS0xA19435F193E081AC

The GTA V native GET_VEHICLE_COLOURS of the VEHICLE namespace, as LS:MP client scripts call it: the global function getVehicleColours, in JavaScript and in Lua.

SignatureJavaScript
getVehicleColours(vehicle: Vehicle): [
  colorPrimary: number,
  colorSecondary: number
]
SignatureLua
getVehicleColours(vehicle: Vehicle): integer, integer

Usage

JavaScript
const [colorPrimary, colorSecondary] = getVehicleColours(vehicle);
Lua
local colorPrimary, colorSecondary = getVehicleColours(vehicle)

Parameters

ParameterTypeJavaScriptLua
vehicleVehiclenumberinteger

Returns

2 values, in this order: an array in JavaScript, multiple return values in Lua.

#ValueTypeJavaScriptLuaDescription
1colorPrimaryintnumberintegeroutput
2colorSecondaryintnumberintegeroutput

Reference

Namespace
Vehicle VEHICLE
In the game
void GET_VEHICLE_COLOURS(Vehicle vehicle, int* colorPrimary, int* colorSecondary)
Hash
0xA19435F193E081AC

Open in the interactive natives reference