How to Add Custom Cars to Qbox (qbx_core vehicles.lua and qbx_vehicleshop)

Qbox does not use the QBCore vehicle format. Convert the mod, install the resource, add a keyed entry with a hash to qbx_core's shared/vehicles.lua, then make sure the shop actually lists the car's category, which the default PDM does not do for sports and super cars.

Published 9 min read4 sections

Qbox grew out of QBCore, and a lot of QBCore advice still works on it. Vehicles are an exception: the file has the same name but a different format, and the shop is assigned in a different place. Copying a QBCore line into Qbox is the most common reason a custom car never shows up. This guide goes from a gta5-mods.com page to a car on sale in qbx_vehicleshop.

You need: a Qbox server you can restart, file access to resources, and an admin account (the group.admin ACE) for the test spawn. The example spawn name is gtr35.

Step 1: Convert the car and note the spawn name

Paste the gta5-mods.com page link into the converter and download the zip. The first 3 conversions are free; after that it is a one-time $15 for unlimited conversions. You get one resource folder containing fxmanifest.lua, a common/ folder with the meta files and a stream/ folder with the models and textures.

The spawn name is the <modelName> value in common/vehicles.meta and the name of the main .yft in stream/. Note it in lowercase; the Resource Inspector shows it too. See spawn name and model hash for the background.

Step 2: Install the resource and ensure it

text
resources/
└── [cars]/
    └── gtr35/
        ├── fxmanifest.lua
        ├── common/
        └── stream/

The Qbox recipe's server.cfg already starts its own category folders. Add yours below them:

cfg
ensure ox_lib
ensure qbx_core
ensure ox_target
ensure [ox]
ensure [qbx]
ensure [standalone]
ensure [cars]

Only ensure [cars] is new. Bracket folders are categories, so that one line starts every car you drop in later. For the panel side, see installing cars via txAdmin.

Step 3: Check that it spawns

Restart, or run refresh and ensure gtr35 in the console, then in game:

text
/car gtr35

/car is restricted to group.admin. If your core config has requireOptIn enabled, run /optin first or the command refuses. If the car does not appear, fix the resource before going on: start with the invisible car guide or the Error Analyzer.

Step 4: Add the car to qbx_core/shared/vehicles.lua

Open resources/[qbx]/qbx_core/shared/vehicles.lua. The file returns one table, keyed by model. Add your entry inside it, for example right after the opening return {:

lua
    gtr35 = {
        name = 'GT-R R35',
        brand = 'Nissan',
        model = 'gtr35',
        price = 185000,
        category = 'sports',
        type = 'automobile',
        hash = `gtr35`,
    },
KeyWhat to put there
table keyThe spawn name. It must equal model.
name, brandShown together as "Nissan GT-R R35" in the shop and the garage.
modelThe spawn name from step 1, lowercase.
priceA number, no quotes.
categoryA category the target shop lists. See step 5 before you choose.
typeautomobile for cars. The stock file also uses bike, boat, heli, plane, submarine and trailer.
hashThe spawn name between backticks, not quotes.

The three things that differ from QBCore:

  • The entry is keyed (gtr35 = { ... }), not an anonymous list item.
  • hash is required. Qbox builds its hash lookup from this field. The backticks are FiveM's Lua shorthand for "the hash of this name"; writing the name in quotes instead would store a string and break the lookup.
  • There is no shop key. Shops are assigned in qbx_vehicleshop.

Warning

A spawn name that starts with a digit or contains a dash is not a valid bare Lua key. Write it as ['2015i8'] = { ... } instead. The model and hash lines stay as they are.

Step 5: Make the shop list the car

Open resources/[qbx]/qbx_vehicleshop/config/shared.lua. The vehicles block at the top decides which shop a vehicle belongs to, in this order: the models table, then the categories table, then default (which is 'pdm' in the stock file). A new car that you mention nowhere therefore lands in pdm.

Landing in the shop is not enough. Each shop also has its own categories table, and the menu only offers the categories written there. The stock pdm shop lists sportsclassics, sedans, coupes, suvs, offroad, muscle, compacts, motorcycles, vans and cycles. It does not list sports or super. A car with category = 'sports' is assigned to PDM and then has no menu entry to appear under.

Pick one of two fixes. Either give the car a category PDM already lists, or add the category to the shop:

lua
    shops = {
        pdm = {
            -- ...
            categories = {
                sportsclassics = 'Sports Classics',
                sedans = 'Sedans',
                coupes = 'Coupes',
                suvs = 'SUVs',
                offroad = 'Offroad',
                muscle = 'Muscle',
                compacts = 'Compacts',
                motorcycles = 'Motorcycles',
                vans = 'Vans',
                cycles = 'Bicycles',
                sports = 'Sports', -- added
            },

To send one car to a specific shop regardless of its category, add it to vehicles.models:

lua
        models = {
            gtr35 = 'pdm',
            -- gtr35 = { 'pdm', 'luxury' },  -- more than one shop

Note

In the stock config many sports and super models are mapped to a luxury shop whose definition is commented out further down the file. If you copy that pattern (gtr35 = 'luxury') without enabling the luxury shop, the car has no shop at all. Also check vehicles.blocklist: a model listed there is never sold.

Step 6: Restart and buy the car

vehicles.lua belongs to qbx_core, and the shop and garage resources read the list from the core when they start, so restart the whole server after editing it. Then go to the dealership, open the catalog at a showroom vehicle, choose the category and select the car. Buy it, park it and open the garage: the entry should read "Nissan GT-R R35".

Not showing up? Check these in order

  1. /car gtr35 does not work. Resource problem. Check the folder location, ensure [cars] and the console. The shop itself logs Failed to find model with the hint that the vehicle might not be streamed.
  2. The category is not in the shop's categories table. This is the default behaviour for sports and super at PDM. See step 5.
  3. hash is in quotes or missing. It must be the spawn name between backticks, exactly as in the snippet in step 4.
  4. The table key and model differ. Other resources look the car up by the key, then use model to spawn it.
  5. You pasted a QBCore line. { model = 'gtr35', ..., shop = 'pdm' }, is valid Lua on its own, but in this file the entry has no model key and no hash, and qbx_core fails while it builds its hash lookup.
  6. The model is assigned to a shop that does not exist. Check vehicles.models and the keys under shops.
  7. The model is in blocklist.
  8. The server breaks after the edit. A missing comma or brace in vehicles.lua stops qbx_core from loading. Re-check the lines you added.
  9. The garage errors on a car you spawned and saved without an entry. qbx_garages builds its label from the vehicles.lua entry (brand plus name), so every owned vehicle needs one.

The name shows as NULL

The converted resource does not ship a display-name script, so GTA has no text for the car's label and prints NULL wherever a script asks the game for the vehicle name. Open common/vehicles.meta, find the <gameName> value for your car, then add a small client script to the car resource:

lua
-- vehicle_names.lua (inside the car resource)
CreateThread(function()
    -- first argument: the <gameName> value from vehicles.meta
    AddTextEntry('GTR35', 'Nissan GT-R R35')
end)

Then register it in the resource's fxmanifest.lua:

lua
client_script 'vehicle_names.lua'

The Vehicles.meta Generator writes this file for you if you are building the metas from scratch.

FAQ

Can I use my QBCore vehicles.lua on Qbox?

Not as it is. The fields are nearly the same, but each entry has to be converted to the keyed form with a hash line, and the shop values have to move into the qbx_vehicleshop config.

Why backticks for the hash?

FiveM's Lua runtime turns a name between backticks into its numeric hash when the file is loaded. The Qbox type notes say the field is "actually just an integer", which is what the backticks produce.

Do I have to edit qbx_core at all? The README says not to modify the core.

The stock vehicle list lives in qbx_core/shared/vehicles.lua, so this is where a new vehicle is registered at the time of writing. It is a data file, not core logic. Keep your additions together under one comment: replacing the qbx_core folder during an update replaces this file too.

Does the car's price come from vehicles.lua?

Yes, the shop menu shows the price from the entry. Change it there and restart.

I am adding a whole pack. Any shortcut?

Merge the resources with the Car Pack Builder, list the spawn names with the Vehicle List tool, and write one entry per car. Giving them all the same category means a single line in the shop's categories table covers the pack.

Other frameworks

The same walkthrough exists for QBCore and ESX. The panel steps are in installing cars via txAdmin, and the whole tool chain is in the complete workflow.

Sources

Checked on 2026-10-10.

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