How to convert a single-player GTA 5 car mod to a FiveM add-on
To convert a single-player GTA 5 car mod to FiveM, extract the dlc.rpf archive, put the .yft and .ytd files in a stream folder and the .meta files in a data folder, and write an fxmanifest.lua with one data_file line per meta. If the mod replaces a stock car, rename its files to a new model name and add a vehicles.meta entry so it becomes an add-on.
What are the steps, in short?
- Open the mod's
dlc.rpfin an archive tool and extract everything. - Create a resource folder with
streamanddatasubfolders. - Move the model and texture files (
.yft,.ytd) tostream. - Move the
.metafiles todata. - Write
fxmanifest.lua: each meta underfilesand in adata_fileline. - If it is a replace mod, rename the files and write a
vehicles.metaentry for the new name. - Add
ensuretoserver.cfg, restart, spawn the car and read the server console.
What is inside a single-player car mod?
An add-on car for single player comes as a dlc.rpf archive that the player adds to the game's dlcpacks folder. Inside it are the same files a FiveM resource needs, wrapped in the single-player DLC structure:
dlc.rpf
content.xml list of every file and its type
setup2.xml name and load order of the pack
data/ (or common/data/)
handling.meta
vehicles.meta
carcols.meta
carvariations.meta
x64/vehicles.rpf (or x64/levels/gta5/vehicles/...rpf)
mycar.yft
mycar_hi.yft
mycar.ytd
Folder names vary between authors. The file that tells you what is what is content.xml: it lists every data file with a fileType, and those type names are the same ones FiveM uses in data_file lines.
<Item>
<filename>dlc_mycar:/data/vehicles.meta</filename>
<fileType>VEHICLE_METADATA_FILE</fileType>
</Item>
<Item>
<filename>dlc_mycar:/data/carvariations.meta</filename>
<fileType>VEHICLE_VARIATION_FILE</fileType>
</Item>
<Item>
<filename>dlc_mycar:/%PLATFORM%/vehicles.rpf</filename>
<fileType>RPF_FILE</fileType>
</Item>
| In the dlc.rpf | In the FiveM resource |
|---|---|
.yft, .ytd inside vehicles.rpf | stream/ |
| Tuning part models, in their own archive when the car has them | stream/ |
.meta files | data/, each with a data_file line of the type given in content.xml |
content.xml, setup2.xml | Not used. fxmanifest.lua does their job. |
Text labels (.gxt2) | Not used. Add the name with a script line, see below. |
How do I extract the dlc.rpf?
FiveM does not load .rpf archives from a resource, so the files have to come out. Any archive tool for GTA V works. In CodeWalker, start the RPF Explorer, use File > Open Folder... on the folder that holds the dlc.rpf, open the archive and the archives inside it, select the files and extract them with Extract Raw... or Extract All.... OpenIV does the same job.
Archives are nested: dlc.rpf contains vehicles.rpf, which contains the models. Keep going until you reach loose .yft, .ytd and .meta files. The two tools are compared in CodeWalker vs Sollumz.
How do I build the FiveM resource?
Arrange the extracted files like any vehicle resource:
resources/
mycar/
fxmanifest.lua
data/
handling.meta
vehicles.meta
carcols.meta
carvariations.meta
stream/
mycar.yft
mycar_hi.yft
mycar.ytd
Then write the manifest. Every meta is listed twice: once under files so the server sends it to players, and once in a data_file line so the game loads it as the right type.
fx_version 'cerulean'
game 'gta5'
files {
'data/handling.meta',
'data/vehicles.meta',
'data/carcols.meta',
'data/carvariations.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'
| fileType in content.xml | File |
|---|---|
HANDLING_FILE | handling.meta |
VEHICLE_METADATA_FILE | vehicles.meta |
CARCOLS_FILE | carcols.meta |
VEHICLE_VARIATION_FILE | carvariations.meta |
VEHICLE_LAYOUTS_FILE | vehiclelayouts.meta |
The full list of types and the order they load in is in fxmanifest.lua and data_file for vehicles. Starting and spawning the resource is in how to add an add-on vehicle to a FiveM server.
How do I turn a replace mod into an add-on?
A replace mod has no metas and no new name. Its files are named after a stock car, for example sultan.yft, and the game draws them instead of the original. Streamed from a FiveM resource they work the same way: every Sultan on the server changes. To keep the stock car and add yours next to it, give the model its own name.
- Rename the files. The file names are the model name.
The textures inside thesultan.yft -> mycar.yft sultan_hi.yft -> mycar_hi.yft sultan.ytd -> mycar.ytd.ytdkeep their names. The dictionary is found by its file name, not by what is inside. - Write a vehicles.meta entry. Copy the entry of the replaced car from the game's own
vehicles.metaand changemodelNameandtxdNameto the new name, plusgameNamefor the display name. LeavehandlingId,layoutandaudioNameHashas they are and the car drives, seats and sounds like the original. Every field is explained in vehicles.meta explained. - Add a carvariations.meta entry with the new
modelNameif you want your own colour combinations. See carvariations and carcols. - Give it its own handling only if you want to tune it. Then copy the handling entry too, with a new
handlingName, and pointhandlingIdat it.
The display name comes from a text label. In FiveM one client script line adds it:
-- client script: readable name for <gameName>MYCAR</gameName>
AddTextEntry('MYCAR', 'My Car GT')What usually goes wrong after converting?
| Symptom | Cause | Where to look |
|---|---|---|
| Console warns about oversized assets | Single-player mods often ship 4096 textures and one heavy mesh | Optimising a FiveM vehicle |
| Tuning parts from another car appear | Two carcols.meta files use the same kit ID | carvariations and carcols |
| Car does not spawn | A meta is missing from files or data_file, or a name does not match | Vehicle troubleshooting |
| Some textures are missing | The mod relied on a shared texture dictionary that was in another archive | Add that .ytd to stream and keep the parent link in txdRelationships. |
One more check before you put somebody else's mod on a public server: read the author's terms. Some single-player mods do not allow redistribution or use on servers.
What if the model is not a GTA 5 mod yet?
A car from another game or a plain 3D file has no skeleton, no GTA shaders and no collision, so there is nothing to extract and rearrange. It has to be rebuilt as a GTA vehicle in a 3D tool first. That workflow is in how to make a FiveM vehicle in Blender with Sollumz.
Frequently asked questions
- Can I use a single-player GTA 5 car mod in FiveM?
- Yes, if the author allows it. The model and meta files are the same. They have to be extracted from the dlc.rpf and arranged as a resource with a stream folder, a data folder and an fxmanifest.lua.
- Can I put a dlc.rpf in the stream folder?
- No. FiveM does not load .rpf archives from a resource. Extract the files first.
- How do I convert a replace car to an add-on?
- Rename the .yft, _hi.yft and .ytd files to a new model name, then add a vehicles.meta entry copied from the replaced car with modelName and txdName changed to that name.
- Do I need content.xml and setup2.xml in FiveM?
- No. They belong to the single-player DLC system. In FiveM the fxmanifest.lua lists the files and their types.
- Which data_file type does each meta need?
- The same type name that content.xml gives it: HANDLING_FILE for handling.meta, VEHICLE_METADATA_FILE for vehicles.meta, CARCOLS_FILE for carcols.meta and VEHICLE_VARIATION_FILE for carvariations.meta.
Sources
Products from this guide
- Coil S-Cooter: FiveM Electric Scooter
- Hoverboard Pack: 3 FiveM Hoverboards
- Complete Bundle: FiveM Scooter + Hoverboards
All guides
- How to install a FiveM resource from Cfx.re Escrow (Granted Assets)
- How to add a custom vehicle to an ESX, QBCore or QBox server
- What are LODs in FiveM vehicles?
- How to add an add-on vehicle to a FiveM server
- vehicles.meta explained, field by field
- handling.meta explained: fields, units and flags
- carvariations.meta and carcols.meta explained
- vehiclelayouts.meta explained: seats, entry points and animations
- fxmanifest data_file reference for vehicles
- Vehicle model files (yft, _hi.yft, ytd) and the oversized asset warning
- FiveM add-on vehicle troubleshooting: causes and fixes
- How to fix "You lack the required entitlement" on a FiveM server
- How a FiveM hoverboard works without a script
- How to make a FiveM vehicle in Blender with Sollumz 2.9
- How to optimise a FiveM vehicle: polygons, LODs and texture budget
- How to set up vehicle collision in Sollumz
- Buying FiveM vehicles: what to check before you pay
- FiveM car packs vs single vehicles
- Real-brand cars on FiveM: allowed or not?
- CodeWalker vs Sollumz: which tool for FiveM vehicles?
