# FiveM spawn codes: cars, peds, weapons and items

URL: https://rivo.tools/guides/fivem-spawn-codes

By Rivo Team · Published 2026-11-25 · Updated 2026-11-25

> A FiveM spawn code is the model name the game uses to create a vehicle, ped or weapon. Here is how to find them for stock and addon content, use them, and rename them safely.

A FiveM spawn code is the model name the game uses to create something: a car like adder, a ped like s_m_y_cop_01, or a weapon like WEAPON_PISTOL. Stock GTA V codes are listed in the official game references, while addon vehicle codes come from the pack's vehicles.meta, which you can read in a few seconds with the [vehicle spawn code finder](https://rivo.tools/app/server-health?mode=spawn-finder).

Below you will find common codes for cars, planes, peds, weapons, ammo and attachments, how to read codes out of addon packs, and how to change a spawn code without breaking the car.

![FiveM vehicle spawn code finder on Rivo Tools](https://cdn.rivo.software/b060cc9e-f663-4d1c-bb13-f261ddda9e23)

### What a spawn code actually is

Every model in GTA V has a name. The game hashes that name with joaat and uses the hash to load the model. When you type /car adder or call CreateVehicle, the name adder is turned into a hash, and if a model with that hash is streamed, it spawns.

That means a spawn code is not a label or a display name. The name you see on a dealership sign or in the vehicle HUD can be different from the code. For addon content, the code is whatever the creator put in the meta files, and it has to match the streamed file names.

### Stock spawn codes

The full lists of stock vehicle, ped and weapon models are in the [FiveM game references](https://docs.fivem.net/docs/game-references/). These are the ones people search for most.

#### Cars

- Supercars: adder, zentorno, t20, osiris, entityxf, turismor
- Sports: elegy2, sultan, comet2, jester, banshee
- Emergency: police, police2, police3, police4, policeb, sheriff, ambulance, firetruk
- Utility and trucks: flatbed, towtruck, mule, phantom

#### Planes and helicopters

- Jets: lazer, hydra, besra, luxor, luxor2, shamal, vestra, miljet
- Light aircraft: cuban800, duster, mammatus, dodo, velum, stunt
- Cargo: titan
- Helicopters: buzzard, buzzard2, maverick, frogger, polmav, cargobob

#### Peds

- Multiplayer freemode peds: mp_m_freemode_01, mp_f_freemode_01
- Police: s_m_y_cop_01, s_f_y_cop_01, s_m_y_sheriff_01
- Ambient: a_m_y_hipster_01, a_f_y_tourist_01, a_m_m_business_01

For more on ped models and addon peds, see [ped FiveM: model list, spawn code and custom addon peds](https://rivo.tools/guides/ped-fivem).

#### Weapons, ammo and attachments

Weapon codes start with WEAPON_, for example WEAPON_PISTOL, WEAPON_COMBATPISTOL, WEAPON_SMG, WEAPON_ASSAULTRIFLE, WEAPON_CARBINERIFLE and WEAPON_PUMPSHOTGUN. Attachments are weapon components that start with COMPONENT_, such as COMPONENT_AT_PI_SUPP_02 (pistol suppressor), COMPONENT_AT_AR_FLSH (rifle flashlight) and COMPONENT_AT_SCOPE_MEDIUM.

Ammo is not spawned on its own in vanilla GTA. You give a weapon with an ammo count, or add ammo to the ped. Inventory frameworks treat ammo and attachments as items instead, so their codes are item names from the framework's item list, for example pistol_ammo in qb-core or ammo-9 in ox_inventory. Check your own items file, since servers often rename or add items.

### How to use spawn codes in game

Base FiveM has no spawn command of its own. The command comes from your framework or admin menu. On QBCore and ESX, admins usually have /car followed by the code, and item commands such as /giveitem with a player id, the item name and an amount. txAdmin's menu can also spawn vehicles by code.

If you are testing on a dev server, a small client script does the same job. Keep commands like this off a live server or restrict them with ACE permissions.

```lua
RegisterCommand('spawncar', function(_, args)
    local hash = joaat(args[1] or 'adder')
    if not IsModelInCdimage(hash) or not IsModelAVehicle(hash) then
        print('Unknown vehicle spawn code')
        return
    end
    RequestModel(hash)
    while not HasModelLoaded(hash) do Wait(0) end
    local ped = PlayerPedId()
    local c = GetEntityCoords(ped)
    local veh = CreateVehicle(hash, c.x, c.y, c.z, GetEntityHeading(ped), true, false)
    SetPedIntoVehicle(ped, veh, -1)
    SetModelAsNoLongerNeeded(hash)
end, false)

RegisterCommand('testgun', function()
    local ped = PlayerPedId()
    GiveWeaponToPed(ped, `WEAPON_PISTOL`, 120, false, true)
    GiveWeaponComponentToPed(ped, `WEAPON_PISTOL`, `COMPONENT_AT_PI_SUPP_02`)
end, false)
```

If IsModelInCdimage returns false, the code is wrong or the resource that streams the model is not started.

### How to find vehicle spawn codes in addon packs

For addon cars, the spawn code is the modelName in the pack's vehicles.meta. It normally matches the .yft file in the stream folder, so a car streamed as mycar.yft and mycar_hi.yft spawns with mycar.

```xml
<Item>
  <modelName>mycar</modelName>
  <txdName>mycar</txdName>
  <handlingId>MYCAR</handlingId>
  <gameName>MYCAR</gameName>
  ...
</Item>
```

The gameName is the display label and handlingId points at handling.meta. Neither is the spawn code. Only modelName is.

#### Finding codes by hand

1. Open the resource folder and find vehicles.meta (it can sit in a data or meta folder).
2. Search for every modelName line and note the value.
3. Cross-check against the .yft files in the stream folder.
4. Ignore modkit parts such as mycar_spoiler1.yft, which are tuning parts, not spawnable cars.

#### Finding codes for a whole pack at once

Large packs with dozens of cars and several vehicles.meta files are slow to read by hand. The Rivo spawn code finder does it for you:

1. Zip the vehicle pack and drop it into the tool.
2. Read the spawn codes listed for each pack, with tuning parts filtered out.
3. Copy them into your garage, dealership or job config.

More detail on what it reads is on the [vehicle spawn code finder page](https://rivo.tools/fivem/vehicle-spawn-code-finder).

### How to change spawn codes in FiveM

People rename codes to avoid clashes between packs, to add a server prefix, or to make codes easier to type. Changing only the modelName line is the most common mistake: the car then fails to spawn or shows up with no textures, because the streamed files still use the old name.

#### What has to change together

- modelName and usually txdName in vehicles.meta
- modelName in carvariations.meta
- The stream files: name.yft, name_hi.yft, name.ytd and any name+hi.ytd
- Modkit part files that start with the old name, if the car has tuning parts
- Any script config that references the code: garages, dealerships, jobs and saved player vehicles in your database

The [spawn code renamer](https://rivo.tools/app/server-health?mode=spawn-renamer) handles the files for you. Drop the zipped pack, rename codes one by one or add a prefix or suffix to all of them, and it rewrites every meta file and renames the stream files so the cars still spawn. You still need to update your scripts and database yourself, because owned vehicles are stored by the old model.

### When a spawn code does not work

- Resource not started: check it is ensured in server.cfg and that it started without errors in the console.
- Meta not declared: vehicles.meta and carvariations.meta need data_file entries in fxmanifest.lua. The [fxmanifest.lua checker](https://rivo.tools/app/server-health?mode=manifest) flags data files that are never declared.
- Broken meta: a typo or mismatched entry stops the car loading. The [vehicle meta checker](https://rivo.tools/app/server-health?mode=meta) lints vehicles, handling, carvariations and carcols together.
- Duplicate codes: two packs using the same spawn code means only one car wins. The [asset conflict finder](https://rivo.tools/app/server-health?mode=assets) lists spawn codes and stream files shared across resources.
- Wrong name: you used the display name or handlingId instead of modelName.

### Codes for props and items

Props spawn by model name too, for example prop_roadcone02a, using CreateObject. Inventory items are different: they are not game models but entries in your framework's item list, so their codes only exist on your server. See [FiveM props: find, spawn and make custom props](https://rivo.tools/guides/fivem-props) for prop names and custom props.

Once you know where a code comes from, the rule is simple: stock content uses the names in the game references, addon content uses whatever the meta and stream files say, and renaming means changing all of them at once.
