[ESX-VehicleShop] Two-VehicleShops

Good day, maybe someone would have time to make me a vehicle shop. I have an esx_vehicleshop but I want one more to sell one of the GTA cars and the other reallife vehicles would be really cool if someone does it for me

Sorry for my englisch im from germany☺️

3 Likes

In the config of that job -Set the playermanagment to true and the rest as true - restart the script and then the car dealers will be able to sell the cars. It’s a bit of a process but it works well when you figure it out.

1 Like

I think he means that he want two car dealers separate.

If that is what you mean you need to copy the script, change resource name then go to the server/main.lua change Some of the sql quarys create new tables in your database and it should be fixed. if you dont have a brain you can add me on discord: s0me1#8974

2 Likes

i am searching for this too! i duplicate the car dealer but is not full working if i find the solution i will post again…

1 Like

i sended you a friend request…i need to script a few custom jobs…and add the same as he if you are up for helping out…its a huge project…and i only need some lua advices

Ye sure i will add you when i get home

1 Like

Hi did you find out?

First duplicate, change name of the folder. Second go through client, utils and server files, change where esx_vehicleshop to esx_vehicleshop2 example if your folder is named esx_vehicleshop2 the rest is just changing db if you want different carshop system. Hope you understand.

Could someone post esx_vehicleshop2 onto here so i can download it, i’m very confused.

1 Like

i did it and this happen

Change the name of sql name of the resource and in the script change the name of f.ex esx_vehicleshop:buy to yourresourcename:buy

1 Like

wow! u just save my life. thank you very much my friend! i love u. no homo. lol

1 Like

and how can we set permission, like with an item or something else?

1 Like

How can I make it take away money from a different column? I need it to take away my custom coin, since it’s an event reward cardealer what I’m trying to do…I already have my coin setup and displaying, only need a way to use it on this now :V

Tried already changing this part:

if xPlayer.getMoney() >= vehicleData.price then
		xPlayer.removeMoney(vehicleData.price)
		cb(true)
	else
		cb(false)
	end

but in any way I change it I keep getting a compare number with nil error.

1 Like

You need to use the remove account money (not remove money) function…which then would get passed the custom coin name that you have setup on ESX

Thanks for the reply, I did tried setting it like this:

if xPlayer.getAccount(‘coin’) >= vehicleData.price then
xPlayer.removeCoin(vehicleData.price)
cb(true)
else
cb(false)
end

Obviously ‘coin’ is the column name of my custom coin on user table
and RemoveCoin is basically a copy of RemoveBank but with (‘coin’) instead of (‘bank’)

but whenever I try to buy a vehicle like this, console say “compare number with nil” or “compare number with table” error…tested many ways so far…

Can someone post the other vehicleshop?

You can use esx_vehicleshop and esx_advancedvehicleshop with a little tweaking

I am working on the same thing, only that I change the name esx_vehicleshop, by esx_johndealer.

I have only one error that I cannot solve,
SCRIPT ERROR: @ esx_johndealer / client / main.lua361: attempt to index a nil value (local 'firstVehicleData')
and when I give to buy the menu appears but not the list of cars, I think it is for the same problem.

Hey, can u give me a script like this ? i do this what you describe but it doesnt work… UFF haha