How to add vehicles to a fivem server 

 

Overview & Purpose

The purpose of this article is to educate new users or new developers on how to add vehicles to either an esx or qbcore framework platform and get their dealerships setup.

 

Objectives 

       My objective at the end of this article is to hopefully educate you on these basic actions taken place when adding vehicles to a fivem server.

 

Materials & Software needed

First let's start with the first and most important thing we need which would be either a vps (You can get one here) or a Dedicated Server (You can get one here).

Second thing you will need to do is download/upload the vehicles to your vps, vds or game panel simply drag and drop i also recommend to have your cars packed into a simple car pack it helps cut down on amount of resources your server has  now let's move on to the 3rd step.

ESX

third you will need HeidiSQL start by opening heidiSQL  

After opening heidiSQL you will now select your database and selected you will then search for vehicles it will be on the left hand side of the heidiSQL panel

After selecting vehicles you then see me circle the data section because this where the action happens as you can see how its laid out right there is picture 2 it goes name, model ,price and category and let me clarify a new things the name in this section doesn't mean the spawn code of the car it means the base display name of your vehicle when you get to model this is where u put the vehicles spawn code and then the category is basically where u would either put vehicles in sports, sedan, suv, super and so on after all of this you can now restart your server and go check out your newly stocked dealership. 

 

QB

So Now lets tech you how to get them into your dealership on qbcore ok this is a lil more tricky because its base more on the lua side of things now lets begin first u will upload the vehicles like i said to do for esx but u dont do the database part after dragging n dropping your vehicles you will go into your qbcore/shared/vehicles.lua and there it basically gives you a bunch on templates to go through n change to your info for example 

    ['22g63'] = {
        ['name'] = '22g63',
        ['brand'] = 'Grotti',
        ['model'] = '22g63',
        ['price'] = 20000,
        ['category'] = 'compacts',
        ['categoryLabel'] = 'Compacts',
        ['hash'] = `22g63`,
        ['shop'] = 'pdm',
    }, 
just don't change the brand. 
 
 
 
Also just just a little tip if your cars are from gta v mods and they not fivem ready here's a website that can do it for you https://gta5mods.hk416.org/en
Помог ли вам данный ответ? 1 Пользователи нашли это полезным (1 голосов)