[ESX-VehicleShop] Two-VehicleShops

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

I want to be able to do the same thing but I just want to be able to use the same DB on all 3. So really all I have is 3 cardelaer locations on the map and the blips all do the same thing. So I want to place 3 different blips. hope someone can help as I am starting to pull my hair out

esx_vehicleshop2.rar (81.0 KB)

if you still need the script

3 Likes

Hi everyone, i need ur help for my esx_bikeshop because, when i open the buy Menu , only my game
do not answer and finally shutdown. Thanks for ur help

how i can insert cars into there?