Simple tutorial on how to add vehicles to your FiveM server [Add-on/Replace]

I wanted to create a simple tutorial that everyone can understand about how to add different types of custom vehicles to their server. This article is mainly for people that want to get into FiveM development but have never worked with it before. There will be 2 parts to this tutorial. Like I said, this is very simple and anyone can do it!

I would recommend using my template so you don’t have to make all of the files yourself. Here is a link : [Release][Paid] Add-on/Replace Vehicle Template - FiveM Resource Development & Modding / Releases - Cfx.re Community

Part I. Replace Vehicles
Possibly the easiest type of vehicle to put into your server, replace vehicles only require the vehicle files themselves (as in the .yft and .ytd files included in the download). See below if the replace download comes with any .meta files.

Step one - create a folder for the name of your vehicle. This can be anything you want, but I’d recommend keeping it simple as we will need it later on.

Step two - Inside that folder, make another folder labeled ‘stream’. Drag and drop the YFT and YTD files into the ‘stream’ folder. This will tell FiveM to stream the vehicles to your server once we put the resource in your server files.

Step three - Back out until you are in the original folder (the one that ‘stream’ is housed in). Right click > new text document. Inside of that document, paste the following text:

resource_manifest_version '77731fab-63ca-442c-a67b-abc70f28dfa5'

files {

}

data_file '' ''

client_scripts 'vehicle_names.lua'

File>save as>__resource.lua (Two underscores!)

From there, drag and drop your new resource into your server resources, and add ‘start (foldername)’ to your server.cfg

Badda-bing, Badda-boom. You’ve created a replace resource!

Part II. Add-on Vehicles
Add-on vehicles are assets which require the vehicle files themselves (as in the .yft and .ytd files included in the download) and 1-4 .meta files. These are a little bit more complicated and can take some time.

Step one - create a folder for the name of your vehicle. This can be anything you want, but I’d recommend keeping it simple as we will need it later on.

Step two - Inside that folder, make another folder labeled ‘stream’. If the download comes with an RPF file (rage package file), you will need OpenIV to be able to work with it. You should be able to google a tutorial on that if you need too. If not, repeat step two from the replace tutorial. Drag and drop YFT and YTD files into the ‘stream’ folder.

Step three - Back out until you are in your base folder. Right click > new text document. Inside of that document, paste the following text:

resource_manifest_version '77731fab-63ca-442c-a67b-abc70f28dfa5'

files {
    'vehicles.meta',
    'carvariations.meta',
    'carcols.meta',
    'handling.meta',
}

data_file 'HANDLING_FILE' 'handling.meta'
data_file 'VEHICLE_METADATA_FILE' 'vehicles.meta'
data_file 'CARCOLS_FILE' 'carcols.meta'
data_file 'VEHICLE_VARIATION_FILE' 'carvariations.meta' 

File>save as>__resource.lua (Two underscores!)

Go back to your download/rpf and drag all of the .meta files that were included in the download into your base folder. If it didn’t include a carvariations.meta file, remove ‘carvariations.meta’ and data_file ‘VEHICLE_VARIATION_FILE’ ‘carvariations.meta’ from your __resouce.lua. Do this for every .meta file it doesn’t include.

From there, drag and drop your new resource into your server resources, and add ‘start (foldername)’ to your server.cfg.

You’ve created an add-on resource!

13 Likes

For some reason “data_file ‘CARCOLS_FILE’ ‘carcols.meta’” got deleted from the post. Re-added it. This might’ve caused problems if people actually used this instead of the template. Fixed now.

2 Likes

anyway to make https://www.gta5-mods.com/vehicles/2014-srt-viper-t-a#description_tab work? ive seen it in server but it to big is what ppl tell me

Yep… Max file size for FiveM is 16mb.

Do you have meta file templates? Like for if I wanted to add a handling.meta to a vehicle that didn’t come with one?

1 Like

Check out this tutorial: https://forums.gta5-mods.com/topic/3842/tutorial-handling-meta . It’s super helpful and easy to understand. Hope this helps :slight_smile:

1 Like

I do my own 3D modeling (I use 3DS Max). I’d like to know if there is a tutorial for incorporating my own models into the game. I’d also like to know if there are specific settings or file extensions for exporting from 3DS. I realize this is a lot to ask, but I’d very much like to get into making new vehicles (not replacing existing vehicles) for the game. I do specialize in Automotive, and I make my own textures. I would also like to know if there are specific settings or “variations” that deal with damage physics.

Unfortunately, I have no experience in 3DS. I’m sure you can find some tutorials online but I usually stick with public dev models in Zmodeler. :+1:

how i can spawn that new car added form addon ?
like i named my resource “newCopCar” then i use in server.cfg “start newCapCar” then in server when i use “/car newCapCar” the car will not spawn !!! is there any where that i must add newCapCar for that server recognize that?

Adding vehicles easy work, what I’m trying to accomplish is instead of having to add:

Example:
start xxx
start zzz
start www
start bmw
start etcetc…

for each vehicle is adding them to one folder:
start emergencyvehicles (contains Ex: 5 vehicles)
start civvehicles (contains Ex: 18 vehicles)

Basicly so I dont need to add a start for every single vehicle, but how do I do this?
If there’s someone that knows how to tidy it up it would be greatly appreciated, that way server.cfg looks better to manouver through.

You need to search for the stream folder and use the .ytf/.ytd name to spawn it in. You can’t spawn a vehicle with the foldername unless you use the same name as the file I mention, hope you understand what I mean.

how to spawn the streamed vehicles ?

Hello. Sorry for the late reply. A possible approach (and what I use the most) is to simply combine all of the .meta files together. I assume there are plenty of tutorials out there on how to do it, but I mostly taught myself because it is very self-explanatory. I use this the most when converting certain replace vehicles to add-on vehicles, and it works very well. You can see how the developers did it with the vanilla cars if you look into the vehicles.meta file in the main game folder. They have all of the vehicles.metas in one file, handling.metas in one file, etc. Hope this helps :slight_smile:

1 Like

Thank you for reply this definitely helps, now I can start tidying up the vehicle folders :ok_hand: I might share the car packs in the future if anyone is interested.

GaLzZy just use the name in the stream folders.

What’s the XML file for? Sorry new to this.

Hello, I have a question I downloaded motorcycle files, and the motorcycle has more crate files in its back. I wanted to know why I launch the motorcycle it comes without the crates even though I put them in the stream folder, should I add it to the resource then where, if not what to do ?!Screenshot_1

Hello, you have to rename the first part of the file, as the vehicle name.
Ex. africat.ytf [File Name]
africat_bag_1.ytf [Custom Name]

1 Like

How to fix this problem? When i enter the vehicle game crash.

Thank you!

2 Likes

You will need to get the vehiclelayouts.meta file from the AI folder in the dlc.rpf file

Copy this and make sure its included in the __resource.lua file

hello i have a question how to replace a car with a specified in game car ?