Adding more liveries
Add liveries to a FiveM vehicle, either as _sign textures in the .ytd or as livery tuning parts in carcols.meta, and fix kit ID clashes.
On this page
A vehicle can get its liveries in two ways, and which one your car uses decides how you add more:
| Texture liveries | Livery tuning parts | |
|---|---|---|
| Where they live | Textures in the vehicle's .ytd file | Separate .yft models in stream |
| Set in game with | SetVehicleLivery | SetVehicleMod (mod type 48) |
| Files to edit | .ytd, vehicles.meta | .yft, carcols.meta |
| Typical use | Police, EMS and fleet cars | Cars with livery options in the tuning menu |
To see which one your car uses, look in its stream folder. Files named like carname_livery1.yft mean tuning parts. Otherwise open the .ytd in OpenIV or CodeWalker and look for textures ending in _sign_1, _sign_2 and so on.
Tools you need: OpenIV or CodeWalker for .ytd files, and any image editor. The vehicle pack's livery template (a .psd or .png) makes placing the design much easier.
Method 1: Texture liveries
- Make the design. Paint it on the livery template, keeping the same size as the existing livery textures. Save it as a
.png. Leave transparent the areas where the car's paint should show. - Open the
.ytd. Copy the vehicle's.ytdfrom thestreamfolder to a work folder and open it in OpenIV (turn on Edit mode) or in CodeWalker's texture editor. - Find the last livery. Livery textures are named
carname_sign_1,carname_sign_2and so on. Note the highest number. - Import your design and rename it to the next number. If the last one is
police3_sign_4, yours ispolice3_sign_5. The name must match the others exactly apart from the number. - Save the
.ytdand put it back in thestreamfolder, replacing the old one. - Check the livery flag. Open
vehicles.meta, find your car's entry, and make sureFLAG_HAS_LIVERYis in its<flags>line:
<flags>FLAG_HAS_LIVERY FLAG_EXTRAS_REQUIRE FLAG_EMERGENCY_SERVICE</flags>Flags are separated by spaces. Add it to the existing list rather than replacing the line.
- Restart the server.
In game, liveries are numbered from 0, so _sign_1 is livery 0 and _sign_5 is livery 4:
SetVehicleLivery(vehicle, 4) -- shows carname_sign_5
print(GetVehicleLiveryCount(vehicle))Method 2: Livery tuning parts
Here each livery is a copy of a livery model (carname_livery1.yft, carname_livery2.yft …) with a different texture inside, listed as a tuning part in carcols.meta.
- Copy an existing livery model. Take the highest-numbered one, for example
sentinel_livery9.yft, and copy it as the next number,sentinel_livery10.yft. - Swap its texture. Open the new file in a tool that edits textures inside
.yftmodels, such as Texture Toolkit or CodeWalker, and replace the livery texture with your design. Keep the exact same texture name, or the model won't find it. - Put the file in
stream. - Add the part to
carcols.meta. Find the vehicle's kit under<Kits>, and in<visibleMods>copy an existing livery entry and change the model name and label to the new number:
<Item>
<modelName>sentinel_livery10</modelName>
<modShopLabel>SENTINEL_LIV10</modShopLabel>
<linkedModels />
<turnOffBones />
<type>VMT_LIVERY_MOD</type>
<bone>chassis</bone>
<collisionBone>chassis</collisionBone>
<cameraPos>VMCP_DEFAULT</cameraPos>
<audioApply value="1.000000" />
<weight value="0" />
<turnOffExtra value="false" />
<disableBonnetCamera value="false" />
<allowBonnetSlide value="true" />
</Item>- Restart the server.
From a script, livery parts are mod type 48 and, again, counted from 0:
SetVehicleModKit(vehicle, 0)
SetVehicleMod(vehicle, 48, 9, false) -- the 10th livery partThe new livery doesn't show up
Each kit in carcols.meta has an ID and a name:
<kitName>2984_sentinel_modkit</kitName>
<id value="2984" />If another vehicle on your server uses the same kit ID, one of them shows the other's parts or none at all. Change the ID to a number no other resource uses, and use the same new name in the vehicle's carvariations.meta:
<kits>
<Item>2984_sentinel_modkit</Item>
</kits>The name in carvariations.meta must match <kitName> in carcols.meta exactly. Clearing the server cache does not fix a clashing ID; only a unique ID does.
Saving the livery
Garage scripts in ESX and QBCore save both kinds of livery in the vehicle properties, so once a player picks one, it comes back when the car is taken out again.
Still stuck?Ask on our Discord