ESX Vending Machines

hi i am using esx 1.2 when i buy an item i get this error

any solution for this?

Show me your config

Assign other items to just test and create your own for the machines or I don’t know if I did something wrong

It said that a price value is null, like not a real number

may i translate it to vrp?

Of course.

Hi Nosmakos,

first of all thanks for your great work! Just one question. Is it possible to run your script with diff vending machines models?

Thanks mate!

Of course, you can add as many as you like from https://plebmasters.de/?app=objects

The only thing you need to do is to get the Object Hash, open client.lua and place it where local bendingMachines = {-654402915} is. Just add ‘,’ after every object and add the object hash you like.

Wow, fantastic mate! Really also I appreciate your quick support! Amazing! Thanks for your work!

1 Like

The script works BUT i cant buy anything. The items are in my items database but the labels are red and i cant buy anything.

You can always use any items you like.

Its nothign with the items. I did put items we already have in our database into the config but it didnt help. We simply cant buy anything. The text is red on every single item.

This is how the menu looks, if you are talking about the red color over here, thats nothing. Its just a color.

Yep it looks like that on my server too, but i cant buy anything. Maybe i missed the right button…?

You could try give me an error from F8 console or server console.

I fixed it for me. The script was using item.limit which doesnt work on es_extended 1.2. I rewrote it to item.weight and now it works perfectly fine.

1 Like

Damn and i thought about it, i was really sure that this one should be that problem because i use the oldest version.

It’s not an issue, really. I learn a lot regarding lua right now and started to understanding some simple things. Fixing it myself helps a lot, but now people can do it themselfes either if they dont know whats wrong.

2 Likes

Hello,
Thank you for your release to the community.

I would like to ask if there is a way to make the script work with society’s payroll.
If someone buys something the money goes to the society’s (eg. society_burgershot)

Thank you in advance. :grinning:

Hello, yes you can indeed do that, if you know a bit of development, you can do that server side by getting the society account.

	local societyAccount

	TriggerEvent('esx_addonaccount:getSharedAccount', 'society_burgershot', function(account)
		societyAccount = account
	end)

	societyAccount.addMoney(amount)

I am sorry for the delayed response.

1 Like