How to Change the Spawn Name of a FiveM Add-On Car (Rename the Model)

Renaming an add-on car means changing the same word in the stream file names, vehicles.meta and carvariations.meta, and leaving several similar-looking fields alone. This guide lists every place the name appears, what must match what, the known length limits and what breaks outside the resource.

Published 8 min read6 sections

Two cars on your server have the same spawn name, or the mod author called the car mgt and you want mustang15. The spawn name can be changed with a file manager and a text editor. What makes it go wrong is that the name is written in several places, and that a few fields look like the name but are something else.

Note

If you only want a different name on the HUD or in the garage, do not rename the model. That text comes from a small script, vehicle_names.lua, which add-on zips from this site's converter already contain. Change the text there: see the NULL name fix.

Have the resource on disk already? The Resource Inspector checks its manifest, stream files, textures and metas in your browser and lists what is wrong. Open the Resource Inspector

Every place the name appears

The examples rename a car from tiguan to tiguan21.

WhereExampleRename?Must equal
Model file in stream/tiguan.yftYesThe new spawn name
High-detail modeltiguan_hi.yftYesNew name + _hi
Texture dictionarytiguan.ytdYes<txdName>
Second texture file, in mods that have onetiguan+hi.ytdYesNew name + +hi
<modelName> in vehicles.metatiguanYesThe .yft file name
<txdName> in vehicles.metatiguanYesThe .ytd file name
<child> under <txdRelationships> in vehicles.metatiguanYes<txdName>
<modelName> in carvariations.metatiguanYes<modelName> in vehicles.meta
<handlingId> in vehicles.metatiguanNo<handlingName> in handling.meta
<gameName> in vehicles.metatiguanNoThe key in vehicle_names.lua
<audioNameHash> in vehicles.metaoracleNoThe car whose sound it borrows
<kitName> and part names in carcols.metatiguan_roof_01NoThe part files in stream/

In many mods the same word is used for the model, the handling and the name key, as in this Tiguan. They are still three separate things.

Before you start

  • Pick the name. Lowercase letters and digits, no spaces. It must not be the name of a base game vehicle or of another car on your server; the vehicle spawn codes list shows the base game names.
  • Keep it short. The reference we use gives no maximum for <modelName>. It does give 11 characters for <gameName> and 14 for <handlingId>, so if you plan to reuse the new word in those fields, stay within them.
  • Copy the resource folder somewhere outside resources/ first, so you can go back.

The rename, step by step

Step 1: Rename the stream files

Replace the old name at the start of the four base files and keep whatever follows it:

text
tiguan.yft      ->  tiguan21.yft
tiguan_hi.yft   ->  tiguan21_hi.yft
tiguan.ytd      ->  tiguan21.ytd
tiguan+hi.ytd   ->  tiguan21+hi.ytd   (only if the mod has one)

Rename, do not copy. A file left behind under the old name is still streamed.

Leave the tuning part files alone (tiguan_roof_01.yft, tiguan_bumper_01.yft and so on). carcols.meta lists each of them by file name, so they keep working as they are.

Step 2: Change vehicles.meta

Open vehicles.meta and change two lines in the car's <Item> block:

xml
<modelName>tiguan21</modelName>
<txdName>tiguan21</txdName>
<handlingId>tiguan</handlingId>
<gameName>tiguan</gameName>
<audioNameHash>oracle</audioNameHash>

Then scroll to the end of the file. If there is a <txdRelationships> block that names the car as <child>, change it there too:

xml
<txdRelationships>
  <Item>
    <parent>vehicles_schaf_interior</parent>
    <child>tiguan21</child>
  </Item>
</txdRelationships>

That block links the car's textures to a shared texture set of the base game. Change only the line with the car's own name; the vehicles_..._interior names stay.

Step 3: Change carvariations.meta

xml
<Item>
  <modelName>tiguan21</modelName>
  <colors>

The <kits> entry further down stays as it is. If this file still has the old name, the car spawns with default colours and without its tuning parts.

Step 4: Leave these alone

  • <handlingId> points at a <handlingName> in handling.meta. Change it only if you change both together.
  • <gameName> is the key for the display name. If you change it, change the key in vehicle_names.lua to the same text, or the name reads NULL.
  • <audioNameHash> names the vehicle whose engine sound the car uses. Setting it to the new spawn name commonly leaves the car without engine sound, unless a sound pack with that name exists. See custom engine sounds.
  • carcols.meta: kit names, kit IDs and part names do not depend on the spawn name.
  • fxmanifest.lua lists meta files, not models. It needs no change unless you rename a folder or a meta file.
  • In a converted zip, the line in vehicle_names.lua ends in a comment such as -- spawn name: TIGUAN. It is only a comment.

Renaming the resource folder is optional. If you do, change the ensure line in server.cfg to the new folder name.

Step 5: Update everything outside the resource

The game now knows the car only under its new name.

  • Framework vehicle lists. Change the model (and the table key or hash, where your framework has one) in your QBCore, Qbox or ESX entry. The README in a converted zip has these entries filled in with the original spawn name: QBCore, Qbox, ESX.
  • Cars players already own. Garage scripts commonly save owned cars in the database under the model's name or hash. Those rows are not changed by a rename and point at a model that no longer exists. On a live server, either update the rows (after a database backup) or keep the old name.
  • ELS. An ELS configuration file is named after the spawn name, so it has to be renamed as well. See ELS police cars.
  • Anything else that names the car: job vehicle lists, spawn menus, whitelists and blacklists.

Step 6: Restart and test

Restart the server and reconnect. Spawn the car with the new name, then try the old one, which should no longer exist.

Before going live, drop the folder into the Resource Inspector. It runs in your browser and reports, among other things, a model without its textures.

If something broke

What you seeWhat was missed
The new name is not a valid model<modelName> in vehicles.meta, or the .yft file name
The car is invisible_hi.yft or the base .yft still has the old name: invisible car fix
The car is white, black or untextured<txdName> and the .ytd file name differ: missing textures
Default colours, no tuning parts<modelName> in carvariations.meta
The old name still spawns somethingA file with the old name is still in stream/, or another resource has that car
The name on the HUD is NULL<gameName> was changed without the script

Fixing 'Invalid Model' goes through the first row in detail.

FAQ

Can I rename the car by renaming the resource folder?

No. The folder name is only what you ensure. The spawn name is <modelName> in vehicles.meta together with the model's file name.

How long can a spawn name be?

We found no documented maximum for <modelName>. The documented limits are for neighbouring fields: 11 characters for <gameName> and 14 for <handlingId>. Short names are also easier to type in a spawn command.

Do capital letters matter?

Use lowercase for the name and for the file names. Linux servers treat Tiguan21.yft and tiguan21.yft as different files, and the game works with a hash of the name that, in our reading, is calculated from its lowercase form.

Will players lose cars they already own?

The cars stay in the database, but under the old model, so they cannot be taken out until those rows are updated. Rename a car before players can buy it if you can.

Does this also work for a replace car?

A replace car has no vehicles.meta of its own, so there is more to do than renaming. That route is in replace to add-on.

Sources

Have a gta5-mods.com link ready?

Paste it into the converter and download a FiveM resource with the stream folder, meta files and fxmanifest.lua in place.

  • 3 conversions free, no account needed
  • 2 more free if you leave an email
  • After that: $15 once for unlimited conversions and the Pro tools. No subscription, 14-day refund policy