VehicleClient

getLiveryName

GET_LIVERY_NAME0xB4C7A93837C91A1F

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

SignatureJavaScript
getLiveryName(vehicle: Vehicle, liveryIndex: number): string
SignatureLua
getLiveryName(vehicle: Vehicle, liveryIndex: integer): string

Usage

JavaScript
const text = getLiveryName(vehicle, liveryIndex);
Lua
local text = getLiveryName(vehicle, liveryIndex)

Parameters

ParameterTypeJavaScriptLua
vehicleVehiclenumberinteger
liveryIndexintnumberinteger

Returns

string JavaScript string, Lua string

Notes

From the community native database. Names are LS:MP’s; samples may be written for C++ or another framework.

Returns the text label of the vehicle's liveryIndex, as specified by the liveryNames section of the vehicle's modkit data in the carcols file.

example

int count = getVehicleLiveryCount(veh);
for (int i = 0; i < count; i++)
  {
     const char* LiveryName = getLiveryName(veh, i);
  }

this example will work fine to fetch all names
for example for Sanchez we get

SANC_LV1
SANC_LV2
SANC_LV3
SANC_LV4
SANC_LV5

Use getFilenameForAudioConversation, to get the localized livery name.

Full list of vehicle mod kits and mods by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/vehicleModKits.json

Reference

Namespace
Vehicle VEHICLE
In the game
const char* GET_LIVERY_NAME(Vehicle vehicle, int liveryIndex)
Hash
0xB4C7A93837C91A1F

Open in the interactive natives reference