How to properly add custom cars in qbcore?

I followed a youtube video & I’m able to spawn them name with the “modelname” inside their vehicles.meta

However, I’m unable to add them to my garage and it gives me the message “You cant store this vehicle in your garage”.

I then tried adding them to my vehicles.lua inside qb-core\shared\ but then the PDM stops working and adding cars to my garage breaks aswell.

I made sure to do:

['hog'] = {
	['name'] = 'Warthog',
	['brand'] = 'UNSC',
	['model'] = 'hog',
	['price'] = 9999999,
	['category'] = 'offroad',
	['hash'] = `hog`,
	['shop'] = 'pdm',

This is what the warthog inside my [Vehicles] folder looks like:


http://ss.jimmyfalcone.com/h276y7kl.png (stream)
http://ss.jimmyfalcone.com/0d30jgeq.png (ai)

Im having the same issue. did you find a solution?

1 Like

Yeah, inside your vehicleshop resource, you’ll have vehicle brands under PDM listed inside cfg.lua.

Make sure to have them like this:

[‘imports’] = ‘Imports’,
[‘customs’] = ‘1of1s’,
[‘acura’] = ‘Acura’,
[‘astonmartin’] = ‘Astonmartin’,

Make sure to put “brand” inside your qb-core\shared\vehicles.lua to the UPPERCASE like Acura
and put “category” to the LOWERCASE acura … :slight_smile:

Make sure the category and brand are the same inside config.lua in vehicleshop like I have them above

Example cfg.lua: http://ss.jimmyfalcone.com/7apkdzmz.png

Example vehicles.lua: http://ss.jimmyfalcone.com/3suqbehr.png

IMPORTANT

make sure all your custom car categories are BEFORE the non-custom cars in vehicles.lua

they wouldn’t work for me until I put them to the top like this: http://ss.jimmyfalcone.com/sb1uqwky.png (beginning of customs)
http://ss.jimmyfalcone.com/imujd6r0.png (end of customs)

1 Like

your example links are not working

1 Like

Have anybody found a working example i get stuck with the brand name as well if i use add on cars how would i go and fine the brand of that car form the meta file

[‘car spawn name’] = {
[‘name’] = ‘what you want the full title of the car to be’,
[‘brand’] = ‘namebrand of vehicle’,
[‘model’] = ‘car spawn name’,
[‘price’] = whatever price you pick but dont add commas,
[‘category’] = ‘use a category that already exists’,
[‘hash’] = GetHashKey(“car spawn name”),
[‘shop’] = ‘pdm’,
},

1 Like

copy and paste

[‘car spawn name’] = {
[‘name’] = ‘what you want the full title of the car to be’,
[‘brand’] = ‘namebrand of vehicle’,
[‘model’] = ‘car spawn name’,
[‘price’] = whatever price you pick but dont add commas,
[‘category’] = ‘use a category that already exists’,
[‘hash’] = GetHashKey(“car spawn name”),
[‘shop’] = ‘pdm’,
},

2 Likes

thank you

1 Like