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

roleplay
police
server
development
civilian

#1

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:(Since some wannabe rmoderator decided to wrongly move my post, I’ll just give a direct download to it:vehtemplate.rar (789 Bytes)

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!


[Release] Add-on/Replace Vehicle Template
#2

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.


#3

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


#4

Yep… Max file size for FiveM is 16mb.


#6

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?


#7

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:


#8

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.


#9

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: