Zum Inhalt springen
Installing vehicle packs

Installing vehicle packs

Add custom cars to a FiveM server: FiveM ready vs singleplayer add-ons, folder layout, data_file lines, vehicle names, framework shops, ID clashes and textures.

Diese Doku ist vorerst auf Englisch.

Last updated

Custom vehicles are one of the most requested additions to any server, and one of the most common causes of problems when done carelessly. This page shows the clean way to install them.

Plays from youtube-nocookie.com after you click.

FiveM ready or not?

  • FiveM ready vehicles come as a resource: a folder with fxmanifest.lua, a stream folder and meta files. Drop in and ensure.
  • Singleplayer add-on vehicles come as a dlc.rpf for GTA V mods. They need converting: open the RPF with a tool like OpenIV or CodeWalker, copy the .yft/.ytd files into stream/ and the .meta files into data/, then write a manifest. It’s the same result as a FiveM ready pack, just done by you.
  • Replace vehicles overwrite a base game car. Avoid them on multiplayer servers: they remove a vanilla car for everyone.

Folder layout

One resource per car, or a pack with one subfolder per car:

Text
[cars]/
└─ my_cars/
   ├─ fxmanifest.lua
   ├─ names.lua
   ├─ stream/
   │  ├─ car1/  car1.yft  car1_hi.yft  car1.ytd
   │  └─ car2/  car2.yft  car2_hi.yft  car2.ytd  car2+hi.ytd
   └─ data/
      ├─ car1/  vehicles.meta  handling.meta  carvariations.meta  carcols.meta
      └─ car2/  vehicles.meta  handling.meta  carvariations.meta

The manifest

fxmanifest.lua
fx_version 'cerulean'
game 'gta5'

description 'My vehicle pack'
version '1.0.0'

files {
    'data/**/vehicles.meta',
    'data/**/handling.meta',
    'data/**/carvariations.meta',
    'data/**/carcols.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'

client_script 'names.lua'

The ** glob matches every car folder, so you don’t need a line per car. Leave out types a pack doesn’t have. The fxmanifest Generator has a “Vehicle pack” preset that writes this for you.

names.lua
AddTextEntry('car1', 'Vapid Example GT')
AddTextEntry('car2', 'Bravado Sample')

The key is the gameName from vehicles.meta (usually the model name). Without it, the car shows as NULL in menus and garages.

Install and test

  1. Put the pack in resources/[cars]/ and add ensure my_cars (or ensure [cars]) to server.cfg.
  2. refresh and ensure my_cars, or restart.
  3. Spawn the car by its model name (vMenu, txAdmin’s menu, /car from your first resource, or your framework’s admin command).
  4. Check: model and textures load, handling feels right, doors and seats work, tuning parts appear, lights and sirens (for emergency vehicles) work.

Adding it to your framework

Spawning works right away, but players can only buy and store it once the framework knows about it:

  • QBCore: add the vehicle to qb-core/shared/vehicles.lua (model, name, brand, price, category, shop).
  • Qbox: add it to qbx_core/shared/vehicles.lua, and to the vehicle shop’s config if needed.
  • ESX: add it to the vehicles table (and category) used by esx_vehicleshop.

Follow your framework’s vehicle file format exactly: copy an existing entry and change the values.

Things that go wrong

Problem Cause
Car spawns invisible or doesn’t spawn The .yft name doesn’t match modelName in vehicles.meta, or the meta isn’t registered (data_file path not in files).
Car drives like a default car handlingId in vehicles.meta doesn’t match handlingName in handling.meta, or HANDLING_FILE isn’t registered.
Tuning parts from another car appear, or none at all Mod kit ID clash: two packs use the same kit ID in carcols.meta. IDs must be unique across the whole server.
Wrong siren pattern or lights Siren ID clash in carcols.meta. Find free IDs with the Vehicle Sirens Editor.
Two cars with the same name Duplicate modelName in two packs. One silently wins.
Blurry textures, texture loss around the city Oversized .ytd files. See below.
Name shows NULL Missing AddTextEntry or text label.

The Vehicle Pack Validator reads a whole vehicle resource and lists every broken link between its metas, stream files and manifest: missing handling IDs, kit references, model names and data_file paths. Run it before you install a pack you didn’t make.

Keep packs light

Vehicles are the biggest streaming load on most servers.

  • Keep textures at 2048 or less (1024 for most parts), compressed, with mipmaps. 4K liveries and interiors cause texture loss for everyone. The YTD Optimizer shrinks many .ytd files at once and shows the memory saved.
  • Watch the server console for oversized asset warnings when the pack starts.
  • Don’t stream 300 cars nobody drives. Every car is downloaded by every player.
  • Prefer quality packs made for FiveM over raw singleplayer ports with huge polygon counts.

Tuning and handling

Many “real car” packs are models of real brands, and some are ripped from other games. Selling access to them, or to Rockstar’s own vehicles, breaks the platform rules. Free use on your server is common practice, but know the risk. See Requirements: the rules.