QBCore Adonn Cars

Hi,

i want 2 add addon cars on my QB-Core server but i rlly dont know how, is there any of documantation or some. maybe somone here could help me :smiley:

thx for any help i think this will also helps more than just me

try this: [How-to] Stream vehicles/models from server to client
It’s a bit outdated, so just make a fxmanifest.lua instead of a __resource.lua

2 Likes

Thx bro

3 Likes

Can u Worte me an Exempel fx.Manifests

dose not work for me

sorry for the late answer.

This is just a example! you will need to change it for the files you have.

fx_version 'cerulean'
game 'gta5'
files {
    'data/*.meta'
}

data_file 'VEHICLE_METADATA_FILE' 'data/vehicles.meta'
data_file 'CARCOLS_FILE' 'data/carcols.meta'
data_file 'VEHICLE_VARIATION_FILE' 'data/carvariations.meta'

There could be alot more metadata files you dont always need all of them but if your addon car comes with it you should probably use it.
If you have mor metadata files and dont know how to add/stream them in the fxmanifest just try googling it :slight_smile:
Example: for the carcols.meta, the data_file name is: “CARCOLS_FILE”

This is the Structure i used for this example:
grafik

stream folder content:
grafik

can u send me the file u use just as test if its work on me

1 Like

i dont know what im doing wrong

btw i sont use ESX just that u know

1 Like

I don’t know if you still need help. I just got the message for some reason.

But here it is xD: GitHub - TheRealCasiv2/FiveM-Vehicle-Example

dont listen to this guy above, to add cars to QB-Core you need to go to qb-core/shared/vehicles.lua Example of how to add
Change This
[‘weevil’] = {
[‘name’] = ‘Weevil’
[‘brand’] = ‘BF’,
[‘model’] = ‘weevil’,
[‘price’] = 9000,
[‘category’] = ‘compacts’,
[‘hash’] = weevil,
[‘shop’] = ‘pdm’,

to this

[‘Lambo1’] = {
[‘name’] = ‘LAMBO’,
[‘brand’] = ‘BF’,
[‘model’] = ‘avkarma’,
[‘price’] = 400000,
[‘category’] = ‘super’,
[‘hash’] = avkarma,
[‘shop’] = ‘pdm’,

1 Like

Exactly so I have also done but the shows that the models are not loaded or are not displayed ingame

I have a question I have added to that qbcore/shared/vehicles.lua and when I swap the car to one of the addon vehicles in the pdm it shows up invincible not able to do nun to it, any solutions?

1 Like

Same issue with me. When I switch cars there is an error on the console and the car doesn’t spawn and sometimes my game crashes as well

1 Like

@igotxyz
@PradaU
@TeoDorTV

That’s because that guy was wrong. Adding cars to qb-core/shared/vehicles.lua just adds the car to the vehicle shop. You still need to stream the car to the server. Doing so requires a resource with fxmanifest.lua as stated at the beginning of this comment section.

2 Likes

Hey that I have also tried out but unfortunately nothing has worked the same. I also do not know what you can still do there. but I’ll try times. Thanks I’ll get back to you!

Streaming cars is pretty basic stuff. I’ll write a short quide here in a little bit for you.

did you ever make that guide???

Make sure your .meta files are correct otherwise it will cause crashes

game 'gta5'
fx_version 'cerulean'

author 'AUTHOR HERE'
description 'DESCRIPTION HERE'
version '1.0.0'

files {
    '*.meta'
}

data_file 'HANDLING_FILE' 'handling.meta'
data_file 'CARCOLS_FILE' 'carcols.meta'
data_file 'VEHICLE_METADATA_FILE' 'vehicles.meta'
data_file 'VEHICLE_VARIATION_FILE' 'carvariations.meta'
data_file 'VEHICLE_DLCTEXT_FILE' 'dlctext.meta'
data_file 'VEHICLE_LAYOUTS_FILE' 'vehiclelayouts.meta'

Find a “fivem ready” vehicle. It’s easier to install as it’s already converted. Otherwise you will have to convert it to fivem yourself. For 2 cars isn’t so bad. But converting 200 cars will be tedious lol

Streaming vehicles isn’t different for qbcore server. It’s the same process for all servers. What’s different is adding the vehicle to qb dealerships and such to purchase the vehicle rather than spawn it in with a command