Skip to content
FIVECRATE

How to Spawn a Car in FiveM: Spawn Codes and Commands

How to spawn a car in FiveM: find spawn codes for game and addon cars, peds and weapons, then use txAdmin, vMenu, Qbox, ESX or QBCore admin commands.

Author: FiveCrate
Published:
Updated:
Read time: 13 min
Applies to
FiveM Legacy and FiveM for GTAV Enhanced (game build 3889, The Kortz Center Heist, on Enhanced); txAdmin in-game menu (source of October 23, 2026); vMenu Enhanced v1.0.22 (November 17, 2026); Qbox qbx_core v1.24.1 (October 30, 2026) with qbx_adminmenu and ox_inventory; ESX Legacy 1.16.4 (October 18, 2026) with esx_adminmenu; QBCore qb-core and qb-adminmenu (source of August 24, 2026) with qb-inventory (source of September 11, 2026)
Last verified

Direct Answer

A FiveM spawn code is a model name: adder for a car, a_c_chop for a ped, WEAPON_PISTOL for a gun. The Cfx.re Vehicle Models, Ped Models and Weapon Models pages list the game’s names; an addon car’s spawn code is the modelName value in its vehicles.meta. To spawn a car in FiveM as an admin, type /car adder on ESX or QBCore, /optin and then /car adder on Qbox, or open the txAdmin menu with /tx and pick Vehicle, then Spawn, on any server that runs txAdmin. Without a framework, vMenu’s Vehicle Spawner detects every car the game knows, addons included. Start an addon car’s resource first.

What a spawn code is: model name, display name and hash

Every car, ped and weapon carries several names, and only one of them spawns anything. The official Vehicle Models list shows them side by side:

Display Name: Adder
Hash: 3078201489
Model Name: adder
DLC: Base game
NameExampleWhat it is for
Model name (the spawn code)adderWhat spawn commands take. txAdmin’s spawn dialog says: “Enter in the model name of the vehicle you want to spawn.”
Display nameAdderMenu text. The natives reference describes it as the “display name/text label (gameName in vehicles.meta)”.
Hash3078201489A number made from the model name. GET_HASH_KEY builds it with the “jenkins one at a time method”.

Three practical rules follow from this:

  • A menu label is not a spawn code. The list has three entries called “Police Cruiser”: police, police2 and police3. Only the model names tell them apart.
  • A null display name is normal. Four Utility trailers, docktrailer, freighttrailer, proptrailer and tanker2, show Display Name: null on the list and still have a model name.
  • Spawn commands take the name, not the hash. ESX’s esx_adminmenu has a /model helper command that copies “your current ped or vehicle model hash”, and the Vehicle Models page prints each game car’s hash next to its model name, so a hash in the page’s form (3078201489 for adder) can be looked up there. Typing the number into /car does not work. On ESX the car argument is registered as a string, the command parser drops a value made only of digits, and /car falls back to its default, adder. QBCore hashes whatever you type with joaat, so a number is treated as a name.

FiveM spawn codes for vehicles

FiveM car spawn names: the official Vehicle Models list

The Cfx.re docs page Vehicle Models groups every vehicle by class: Compacts, Sedans, SUVs, Coupes, Muscles, Sports Classic, Sports, Super, Motorcycles, Off-Road, Industrial, Utility, Vans, Cycles, Boats, Helicopters, Planes, Service, Emergency, Military, Commercial, Trains and Open Wheels. Search the page for the name you see in game and copy the Model Name line. A few police entries show the pattern:

Display nameModel nameDLC line on the list
Police CruiserpoliceBase game
Unmarked Cruiserpolice4Base game
Stanier LE Cruiserpolice5The Chop Shop (build 3095)

Framework servers keep a second copy of these names. QBCore’s shared/vehicles.lua says of each model value: “This has to match the spawn code of the vehicle”. Qbox’s qbx_core file shared/vehicles.lua is keyed by model name, starting with adder.

Which DLC cars your server can spawn

The DLC line matters on FiveM Legacy. The server picks a game build with sv_enforceGameBuild, and the docs state that “Every build includes all content and changes from the builds before.” A car marked “(build 3095)” needs build 3095 or newer. FiveM for GTAV Enhanced “currently supports only the latest gamebuild (The Kortz Center Heist)”, build 3889, which loads by default. The sv_enforceGameBuild guide explains how to set the build.

At the time of writing (December 4, 2026), the newest DLC on the Vehicle Models list is “A Safehouse in the Hills (build 3751)”, while the server-commands build table already lists 3889, mp2026_01, The Kortz Center Heist. Cars from that update are not on the page yet. A menu that takes its list from the game, such as vMenu’s Vehicle Spawner, does not depend on the page.

How to find the spawn code of an addon car

  1. Open the vehicles.meta in the car’s resource. CodeWalker’s parser reads each car from CVehicleModelInfo__InitDataList/InitDatas/Item and documents the fields with game examples: <modelName>impaler3</modelName>, <txdName>impaler3</txdName>, <handlingId>IMPALER3</handlingId> and <gameName>IMPALER3</gameName>. The modelName value is the spawn code: CodeWalker indexes every vehicle by the hash of its modelName in lowercase, and the Vehicle Models list gives Future Shock Impaler the model name impaler3.
  2. Check every entry in a pack. One file can hold several Item entries, one per car, each with its own modelName.
  3. Do not use gameName or handlingId. They sit in the same entry but are other fields; gameName is the display label key. Spawn commands take the modelName.
  4. Or let vMenu show it. vMenu Enhanced says “Valid vehicles are automatically detected by the game, including addons”, and “An addon without a name of its own shows up under its model name.”

For script developers, the client native GET_ALL_VEHICLE_MODELS “Returns all registered vehicle model names, including non-dlc vehicles and custom vehicles”. It skips vehicles whose resource was stopped. If the car still refuses to spawn under its right name, the files are the problem: work through addon car not spawning.

FiveM spawn codes for peds

Game peds

The Cfx.re Ped Models page is a “List of all working ped models in GTAV as of July 23, 2019.” It sorts names into groups such as Ambient female, Ambient male, Animals, Gang male, Multiplayer and Story. Examples are a_c_chop (Animals), s_m_y_cop_01 and the two multiplayer models mp_m_freemode_01 and mp_f_freemode_01. Peds added by game updates after that date can be missing from it.

Addon peds

An addon ped is registered in a peds.meta. CodeWalker reads it as a CPedModelInfo__InitDataList whose InitDatas items each have a Name, and it indexes every ped by the hash of that Name in lowercase. Admin tools build the same kind of hash from the text you type: qbx_adminmenu runs the typed model through joaat before it checks it. That Name is the ped’s spawn name. To list the ped in vMenu Enhanced’s Ped Models menu, add it to config/ped-models.json; the docs’ example entry is "my_addon_ped": "Officer Smith". Packaging a ped from scratch is covered in how to add addon peds to FiveM.

FiveM spawn codes for guns

Game weapons

The Cfx.re Weapon Models page sorts weapons into 15 groups, among them Pistol, SMG, Rifle, Machine gun, Shotgun, Sniper, Heavy, Thrown and Melee. The line labelled Hash holds the spawn name, and Model Hash Key holds the 3D model:

Name: Pistol
Hash: WEAPON_PISTOL
Model Hash Key: W_PI_PISTOL
DLC: core

Each weapon also lists its attachment names, such as COMPONENT_PISTOL_CLIP_01. At the time of writing (December 4, 2026), the newest DLC tag on that page is mp2024_01, on WEAPON_STUNROD; the build table maps that tag to build 3258, Bottom Dollar Bounties. Weapons from later updates are not on the page.

Addon weapons

A weapon’s weapons.meta holds an Item type="CWeaponInfo" entry. QBCore’s qb-weapons ships a weaponsnspistol.meta that shows the layout: <Name>WEAPON_SNSPISTOL</Name> followed by <Model>w_pi_sns_pistol</Model>. Name is the spawn name; Model is the same value the Weapon Models page lists as the model hash key. On a framework server, the gun must also be registered with the inventory before the give commands below accept it. The addon weapons guide covers that step for each inventory.

How to spawn a car in FiveM with each admin tool

  1. For an addon car, start its resource. A game car needs no resource. With vMenu, the docs say to start vehicle resources before vMenu in server.cfg; their example uses a car resource named my-vehicles:

    ensure my-vehicles
    ensure vMenu.Enhanced
  2. Confirm you hold the permission the tool asks for (table below).

  3. Spawn it by model name and write the name down: shops and garages ask for the same value.

ServerHow to spawnWho may use it
Any server with txAdmin/tx or /txadmin, then Vehicle and Spawn; the Spawn vehicle dialog asks for the model nameA txAdmin admin whose Discord or Cfx.re identifier is linked, with menu.vehicle (“Spawn/Fix Vehicles”)
vMenu EnhancedVehicle Spawner; typing a name needs vMenu.Enhanced.Menus.VehicleSpawner.SpawnByNameThat permission, plus the vehicle’s class permission
Qbox/car sultan; /car sultan true keeps the car you sit ingroup.admin, after /optin
ESX Legacy/car adder; with no name it spawns an adderThe owner and admin groups (Config.CommandPermissions)
QBCore/car adderThe admin permission

Qbox, ESX and QBCore delete the vehicle you are sitting in before they spawn the new one, except Qbox with true. Each also has /dv to delete a vehicle. Qbox’s opt-in is on by default (requireOptIn = true in qbx_core/config/server.lua) and every admin starts opted out; until you run /optin, /car answers “You are not opted in for admin duty. (/optin to toggle)”. The command is a toggle, so a second /optin opts you out again.

A wrong name looks different in each tool. txAdmin shows The vehicle model name '<name>' does not exist!. QBCore’s client handler returns as soon as IsModelInCdimage is false, with no message. ESX cannot resolve a vehicle type for an unknown model, passes false to the command’s callback, and nothing spawns. Qbox prints the server-console warning No vehicle type found for model for any name that is not in shared/vehicles.lua, creates a temporary vehicle to read its type, and raises temp vehicle never existed if none appears within 10 seconds.

The Qbox admin menu (/admin) has a spawn list of its own, built from qbx_core’s shared vehicle list. An addon car missing from shared/vehicles.lua still spawns with /car, with that warning, but is absent from that menu. Selling and storing a spawned car is a separate step, covered in the dealership guide linked under Next Steps.

If you come from the original vMenu, which the vMenu Enhanced docs call vMenu Legacy, the same docs say: “addons.json is gone. Addon vehicles are detected, addon peds go in ped-models.json, and addon weapons go in weapons.json with their attachments in weapon-components.json.”

How to change your ped with a spawn code

ServerCommand or menuWho may use it
vMenu EnhancedPed Models (from config/ped-models.json); any ped by name with vMenu.Enhanced.Menus.PedModels.SpawnByNameThe ped’s category permission; a ped that is not in the file needs only the spawn-by-name permission
Qbox (qbx_adminmenu)/setmodel <model> [id]admin, after /optin
ESX (esx_adminmenu)/setmodel <id> <model>: the player ID comes firstThe setModel feature permission, set to the admin group by default
QBCore (qb-adminmenu)/setmodel <model> [id]; leave the ID empty for yourselfadmin

The argument order differs: ESX’s menu wants the player ID first, Qbox and QBCore want the model first. Qbox and QBCore switch the model only when IsModelInCdimage and IsModelValid both pass, so a wrong name changes nothing and prints nothing. On QBCore the target’s own client also asks the server callback qb-admin:isAdmin before it changes anything, so /setmodel with the ID of a player who is not an admin does nothing. ESX’s helper returns invalid_model and shows it as a notification.

How to give yourself a weapon by spawn name

ServerCommandName formatAmmo
vMenu EnhancedWeapon Options; any weapon by name with vMenu.Enhanced.Menus.WeaponOptions.SpawnByNameSpawn name, lowercased for you in config/weapons.json—
Qbox, or ESX with ox_inventory/giveitem <id> WEAPON_PISTOL (alias /additem), group.adminNames starting with weapon_ are uppercased for youA separate item: WEAPON_PISTOL uses ammo-9
ESX with its own inventory/giveweapon <id> <weapon> <ammo>, owner and admin groups; me works as the IDMust be in Config.WeaponsThird argument, or /giveammo
QBCore (qb-inventory)/giveitem <id> weapon_pistol 1, adminItem name from qb-core/shared/items.lua, lowercasedA separate item, such as pistol_ammo

In vMenu Enhanced, a weapon listed in config/weapons.json still needs its category permission when you spawn it by name. Qbox marks its own weapon list deprecated and tells server owners to “add your weapons in ox_inventory/data/weapons.lua file”. ESX switches its inventory commands off when ox_inventory is present, because its config sets Config.CustomInventory = "ox". ox_inventory’s /giveitem does nothing and prints nothing when the item name is unknown. qb-inventory gives weapons one at a time with a serial number and answers “Item does not exist” for an unknown name.

Troubleshooting

“The vehicle model name ’…’ does not exist!” in txAdmin

txAdmin checks the name with IsModelValid on your own client before it asks the server to spawn anything. Your game does not know that model: the name is a display name instead of a model name, the car’s resource is not started, or the car belongs to a DLC above your server’s game build on FiveM Legacy. The menu shows the same message for a valid model that is not a vehicle, such as a ped name, because it also checks IsModelAVehicle.

A car from the Vehicle Models list will not spawn

Compare its DLC line with your sv_enforceGameBuild value. On FiveM Legacy, a build below the DLC’s build does not contain the car. On Enhanced, the latest build loads by default; the docs add that sv_enforceGameBuild 1 loads “the base game without any DLCs”.

/car does nothing on Qbox or QBCore

On Qbox, look for the opt-in message and run /optin; if the message does not appear, read the server console for the No vehicle type found for model warning described above. On QBCore, the client handler returns without a message when IsModelInCdimage is false, so check the spelling and that the resource started. If the command is refused outright, set up permissions with how to make yourself admin on QBCore, Qbox and ESX.

/car spawns an Adder on ESX instead of your car

ESX falls back to adder when /car gets no usable name. That happens with no argument, and with a value made only of digits such as a hash: the car argument is typed as a string, the parser drops a number, and validation is switched off for this command, so no error is shown. Type the model name.

/giveweapon on ESX says “Player already has this weapon”

ESX refuses to give a weapon the target already carries. Use /giveammo <id> <weapon> <ammo> for more ammunition.

A custom ped is invisible on FiveM for GTAV Enhanced

The Enhanced patch of November 11, 2026 says: “Peds and players using custom ped models are no longer invisible, since custom peds now stream properly”. The same notes tell server owners to update to the latest cfx-server build.

Next Steps

FiveCrate’s catalogue has categories for addon vehicles, weapons and peds if you need models to spawn.

Official documentation and repository references