Adding custom cars to your FiveM server
For many players, custom cars are the reason to pick your server specifically: a fleet of custom police vehicles, recognisable taxis or simply a garage full of models you won't find in vanilla GTA V. At the same time, no category of content causes long loading times and texture problems as often as cars. In this article we lay out how to add custom vehicles, and how to keep your server from buckling under them.
Addon or replace: choose deliberately
There are two ways to get a custom car onto your server:
| Addon | Replace | |
|---|---|---|
| How it works | Adds a new vehicle with its own spawn name | Replaces the model of an existing GTA vehicle |
| Original | Simply keeps existing | Disappears from your server |
| Handling | Custom handling settings possible | Relies on the original vehicle |
| Advice | Almost always the best choice | Only for deliberate full replacements |
Addon cars are the default on modern servers: the original keeps existing, every car gets its own handling and you keep the overview. Replace looks easier, but as soon as two resources replace the same model, you get conflicts that are hard to track down.
How a car resource is put together
An addon car is an ordinary resource with two kinds of content. The stream folder holds the model files (.yft) and textures (.ytd) that get streamed to your players. Alongside them are meta files that register the vehicle and define its behaviour:
vehicles.meta: registers the vehicle and its spawn name;handling.meta: driving behaviour, top speed, weight and braking power;carvariations.meta: colours and variants;carcols.meta: colour definitions and extras such as sirens.
The fxmanifest.lua ties it all together. Abbreviated, it looks like this (depending on what the car ships with, there will be more or fewer lines):
fx_version 'cerulean'
game 'gta5'
files {
'vehicles.meta',
'handling.meta',
'carvariations.meta'
}
data_file 'VEHICLE_METADATA_FILE' 'vehicles.meta'
data_file 'HANDLING_FILE' 'handling.meta'
data_file 'VEHICLE_VARIATION_FILE' 'carvariations.meta'With a bought or downloaded car this is normally already set up correctly. Upload the folder to resources, add an ensure line to your server.cfg and restart. Note: the spawn name comes from vehicles.meta, not from the folder name. The two can differ.
Don't be afraid to tweak the handling. handling.meta holds per-vehicle values for top speed, acceleration, weight and traction, among others. For an RP server that's more than cosmetic: a police chase only works if the vehicles are realistic and balanced against each other. Adjust values in small steps, then restart the resource and test again. Note down what you change, so you can go back if the driving behaviour suddenly turns weird.
Car pack or individual cars?
Car packs, dozens of cars in a single resource, are tempting: one download, one ensure, done. But the downsides are substantial. You also get the forty cars you don't need, including all their textures. One broken meta file can take down the whole pack. And debugging is miserable: which of the sixty cars is causing that crash? Individual cars or small themed packs, for example just your police fleet, take more installation work but give you control over exactly what's on your server. If you're just starting out, keep it to a dozen or so cars that truly fit your server; you can always expand later.
Why a heavy car pack slows your server down
This is where things go wrong most often, so let's be precise. Vehicle models and especially their textures are streamed to your players. The more and the heavier the cars, the more has to go over the wire and the more video memory every player loses:
- Longer loading times. Players joining have to download more data. A city with gigabytes of car packs feels slow before anyone even drives.
- Texture loss. Unoptimised cars with enormous textures push other assets out of memory. The result: blurry buildings and flickering textures, precisely in places that have nothing to do with cars.
- Stuttering in busy spots. Wherever many different custom cars sit together, the game of every player nearby has to load all those models at once.
The remedy is unexciting but effective: fewer and better. Pick cars optimised for FiveM, remove what nobody drives and be critical of packs promising hundreds of vehicles. Disk space is rarely the bottleneck here; the FiveM plans from MC-Node run on NVMe storage, but what your players have to download and fit into their video memory isn't fixed by a bigger plan.
Spawning: vMenu, commands or a garage
On freeroam servers vMenu is the usual route: addon cars you add to the vMenu configuration simply appear in the vehicle menu. On RP servers you usually want cars to run through the economy: a dealership or garage script from your framework, so players buy and own vehicles instead of spawning them. For testing after installation, the quickest way to spawn a car is with the spawn name from vehicles.meta, for example via your admin menu's spawn command. If the spawn name doesn't work, first check that the resource actually started and that you've got the name exactly right. Also share new spawn names with your staff team, so not everyone has to dig through vehicles.meta themselves.
The legal side of paid models
For cars too: buy from the creator, usually through a Tebex store, and read the licence. Most licences apply to one server and prohibit sharing or reselling. Leaked paid models are the same bad deal as leaked scripts: you don't know what's inside, you get no updates and you're violating the terms. Also be careful with models ported from other games: content ripped from other titles is against the Cfx.re rules and can get your server into trouble. So pick your models as carefully as your scripts; your players will notice the difference, and you'll sleep easier.