ServersYour serverFor creatorsForumFAQDocumentationSecurity
Download the launcher
  1. Documentation
  2. Server functions
  3. getVehicleColorId

Function

getVehicleColorId

ServerVehiclesTrilogy Hub only

Returns the two palette numbers set with setVehicleColorId. When the vehicle has RGB colours from setVehicleColor (or none yet), it returns false; use getVehicleColor then.

Syntax

int, int getVehicleColorId(vehicle vehicle)

Arguments

vehiclevehicle
The vehicle.

Returns

Colour numbers 1 and 2, or false.

Example

local vehicle = createVehicle(411, 2000, -1690, 13.5)
setVehicleColorId(vehicle, 3, 1)
local c1, c2 = getVehicleColorId(vehicle)
outputDebugString(c1 .. ", " .. c2)

See also