# How to Add Cars to a FiveM Server (Add-On and Replace)

Add custom cars to a FiveM server: the resource folder, stream folder, fxmanifest.lua and data_file lines, ensure in server.cfg, and keeping file sizes sane.

Updated 2026-10-01. https://gamezservers.com/guides/how-to-add-cars-to-a-fivem-server

To add a car to a FiveM server, put it in its own resource folder inside `resources`, with the model and texture files (`.yft` and `.ytd`) in a `stream` folder, the `.meta` files next to them, and an `fxmanifest.lua` that declares those metas with `data_file` lines. Then add `ensure your-car-resource` to `server.cfg` and restart. Here is the exact layout, the manifest to copy, and how to keep car packs from wrecking load times.

## Add-on or replace: which kind of car do you have?

Custom cars come in two kinds, and they install differently.

| | Add-on | Replace |
| --- | --- | --- |
| Spawn name | Its own, like `mycar` | Takes over a GTA V car, like `adder` |
| Files | `.yft`, `.ytd` plus `.meta` files | Usually only `.yft` and `.ytd` |
| Needs `data_file` lines | Yes | Usually no |
| Original car still exists | Yes | No, every one in the world changes |
| Best for | Almost everything | Quick swaps, police and emergency fleets that reuse vanilla names |

Use add-on cars where you can. Replacing a vanilla model changes every copy of it, including the ones traffic spawns, and two replace resources for the same model fight each other.

## What files does a FiveM car need?

A typical add-on car from a creator looks like this once it is ready for FiveM:

```
resources/
  [cars]/
    mycar/
      fxmanifest.lua
      data/
        vehicles.meta
        carvariations.meta
        carcols.meta
        handling.meta
        vehiclelayouts.meta   (only some cars have this)
      stream/
        mycar.yft
        mycar_hi.yft
        mycar.ytd
        mycar+hi.ytd          (some cars)
```

| File | What it does |
| --- | --- |
| `*.yft` | The 3D model. `_hi` is the detailed version you see up close. |
| `*.ytd` | Textures. |
| `vehicles.meta` | Defines the car: model name, handling id, layout, class. |
| `handling.meta` | Speed, grip, braking, mass. |
| `carvariations.meta` | Colours, liveries, mod kits and plate style. |
| `carcols.meta` | Mod kits and, for emergency cars, siren settings. |
| `vehiclelayouts.meta` | Custom seat and door animations. Only some cars ship it. |

Anything inside the `stream` folder is streamed to players automatically. You do not list it in the manifest.

Folders in square brackets like `[cars]` are just for sorting. FiveM looks inside them for resources, so `ensure mycar` still works.

## The fxmanifest.lua for an add-on car

Create `fxmanifest.lua` in the car's folder:

```lua
fx_version 'cerulean'
game 'gta5'

files {
    'data/vehicles.meta',
    'data/carvariations.meta',
    'data/carcols.meta',
    'data/handling.meta',
    'data/vehiclelayouts.meta',
}

data_file 'HANDLING_FILE' 'data/handling.meta'
data_file 'VEHICLE_METADATA_FILE' 'data/vehicles.meta'
data_file 'CARCOLS_FILE' 'data/carcols.meta'
data_file 'VEHICLE_VARIATION_FILE' 'data/carvariations.meta'
data_file 'VEHICLE_LAYOUTS_FILE' 'data/vehiclelayouts.meta'
```

Two rules people miss:

1. **Every meta must be in both `files` and `data_file`.** `files` sends it to players, `data_file` tells the game what kind of file it is. A meta in only one of the two does nothing.
2. **Leave out lines for files the car does not have.** No `vehiclelayouts.meta` in the download means no `VEHICLE_LAYOUTS_FILE` line.

The [FiveM resource manifest reference](https://docs.fivem.net/docs/scripting-reference/resource-manifest/) documents `fx_version`, `game`, `files` and `data_file`.

## Putting many cars in one pack

Ten cars as ten resources means ten folders to keep track of. A pack is tidier:

```
resources/[cars]/carpack/
  fxmanifest.lua
  data/
    car1/vehicles.meta ...
    car2/vehicles.meta ...
  stream/
    car1/ ...
    car2/ ...
```

Use wildcards so you do not list every file:

```lua
fx_version 'cerulean'
game 'gta5'

files {
    'data/**/*.meta',
}

data_file 'HANDLING_FILE' 'data/**/handling.meta'
data_file 'VEHICLE_METADATA_FILE' 'data/**/vehicles.meta'
data_file 'CARCOLS_FILE' 'data/**/carcols.meta'
data_file 'VEHICLE_VARIATION_FILE' 'data/**/carvariations.meta'
data_file 'VEHICLE_LAYOUTS_FILE' 'data/**/vehiclelayouts.meta'
```

Keep model names unique across the whole server. Two cars both called `mycar` will load whichever streams last.

## How to install a replace car

1. Find the vanilla spawn name you are replacing, for example `police`.
2. Rename the files to match: `police.yft`, `police_hi.yft`, `police.ytd`.
3. Put them in a `stream` folder inside a new resource with a two line manifest:

```lua
fx_version 'cerulean'
game 'gta5'
```

If the creator also gives you a `handling.meta`, add it with `files` and a `HANDLING_FILE` line like the add-on example.

## Start the car in server.cfg

Upload the folder to `resources` with the **Files** tab or SFTP, then add one line to `server.cfg`. On the txAdmin type, edit it in txAdmin's **CFG Editor**:

```
ensure mycar
```

or for a bracket folder full of cars:

```
ensure [cars]
```

Then load it without a full restart. In txAdmin's **Live Console** (or the panel console on the Plain FXServer type):

```
refresh
ensure mycar
```

`refresh` makes the server notice new folders. `ensure` starts the resource, or restarts it if it is running. Players already on the server may need to reconnect before a brand new car shows correctly. A scheduled restart handles that for everyone.

## How do I spawn the car?

That depends on your framework or menu:

- **QBCore and Qbox:** an admin can type `/car mycar` in chat.
- **ESX Legacy:** admins use `/car mycar`.
- **txAdmin menu:** admins with the vehicle permission can spawn by model name from the `/tx` menu.
- **vMenu:** the vehicle spawner has a field for a custom model name.

## Selling the car at a dealership

Spawning is not the same as owning. To make a car buyable and storable in garages, add it to your framework's vehicle list:

- **QBCore:** `qb-core/shared/vehicles.lua`, one entry with `model`, `name`, `brand`, `price`, `category`, `type` and `shop`.
- **Qbox:** `qbx_core/shared/vehicles.lua`, keyed by model name.
- **ESX:** the `vehicles` table in your database, which the vehicle shop reads.

The `model` must match the `<modelName>` in the car's `vehicles.meta` exactly, in lowercase.

## How big can FiveM car files be?

Big textures are the main reason car packs cause problems. FXServer prints a warning when a streamed asset uses a lot of memory, along the lines of `Asset mycar.ytd uses 22.5 MiB of physical memory. Oversized assets can and WILL lead to streaming issues`.

What we suggest:

- **Keep each `.ytd` under about 16 MB**, ideally under 10 MB. Large `.ytd` files are the usual cause of "texture loss", where roads and buildings fail to load around players.
- **Shrink oversized textures** with a tool like OpenIV or a texture optimizer: 4K textures on a licence plate are wasted. 2K or 1K is plenty for most car parts.
- **Watch the download size.** Every car is downloaded by every player on their first join. A pack of 200 lightly optimised cars can add several gigabytes.
- **Fewer, better cars beat hundreds of copies.** Most roleplay servers do not need five versions of the same supercar.

More cars also means more server RAM, because FXServer has to hold and serve every resource. A server with a large car pack is the reason our 12 GB FiveM plan exists. See the [FiveM plans](https://gamezservers.com/games/fivem) for sizing.

## Why is my car not spawning or invisible?

| Symptom | Usual cause |
| --- | --- |
| "Model does not exist" or nothing spawns | Resource not ensured, or spawn name differs from `<modelName>` in `vehicles.meta` |
| Car spawns but handles like a vanilla car | `handling.meta` missing from `files` or `data_file`, or `handlingId` in `vehicles.meta` does not match the one in `handling.meta` |
| Car is grey and has no mods | `carvariations.meta` not loaded |
| Car is invisible or textures are missing | `.ytd` too large or misnamed, or the `stream` folder is nested one level too deep |
| Server console shows a manifest error | Typo in `fxmanifest.lua`, often a missing comma in the `files` list |
| Game crashes near the car | Broken model or a model built for a newer game build than your server enforces |

Check the server console after `ensure mycar`. It names the resource and file when something fails to load.

## Only use cars you are allowed to use

Use cars the creator lets you run on a server, from the Cfx.re forum, Tebex stores or creators' own pages. Models ripped from other games or leaked paid cars break the [FiveM terms](https://fivem.net/terms) and can get a server taken off the list.

## Add cars on GamezServers

On a [GamezServers FiveM server](https://gamezservers.com/guides/how-to-make-a-fivem-server), press **Backup** first, upload the car folder to `resources` in the **Files** tab or over SFTP, add the `ensure` line in txAdmin's **CFG Editor**, and run `refresh` and `ensure` in txAdmin's **Live Console**. If you want to check whether the new pack is hurting performance, our [FiveM lag and hitch warning guide](https://gamezservers.com/guides/fivem-server-lag-and-hitch-warning-fix) shows how to measure it.

## FAQ

### Do I need to restart the server to add a car?

No. Run `refresh` and then `ensure yourcar` in the console. A full restart is still the cleanest way to make sure every player gets the new files, so many servers just wait for the next scheduled restart.

### What is the difference between fxmanifest.lua and __resource.lua?

`__resource.lua` is the old manifest format. Use `fxmanifest.lua` with `fx_version 'cerulean'` and `game 'gta5'` for anything new. If a car download only has `__resource.lua`, you can write an `fxmanifest.lua` with the same `files` and `data_file` lines and delete the old file.

### How many cars can a FiveM server have?

There is no fixed number. The limits are RAM, player download size and texture sizes. A few dozen well optimised cars are easy, hundreds need more RAM and careful texture work.

### Can I add cars without a framework?

Yes. Add-on cars are plain resources and work on any server. Without a framework you spawn them with the txAdmin menu, vMenu or your own script.
