[Release] [ESX] ESX_SodaMachine - Working in-game soda machines!

I am interested in your code if you are willing to share it! :slightly_smiling_face:

add new machine

Here I leave the coordinates of a machine that does not work is the red and is next to the bus station

{x = 460.61,	y = -705.33,  z = 27.37},

I already have her working

I want add diffrent prop for ecola and sprunk machines thats why ı coppy it and then do that
How can I do that in one script ??

(Sorry for bad english)

Thanks. Please just create a pull request on GitHub, it’ll be much easier

create a pull request
added new Spanish language and coordinates of a new machine

Check commits

i change name item for me server

TriggerServerEvent(‘esx_SodaMachine:buyItem’, “water”, 1)

and config change en per es

I have changed the name of the item for my server but you do not need it

you have new request in git hub
new added new coordinates and new language respecting configuration in English and name of primary items

I have a question about something that I already edit but I would like to know why.
Why do you use the water item and not the refreshment?

Wonderful script man, thanks!
I changed prop name and added a coord to test the coffee cup instead of the soda can in the police station.

Screenshot

It works but I wonder how I can set the script to:

  • give the player a soda if he’s in front of Ecola/Sprunk machines (zones) and Coffe if he’s in front of Coffee zones.
  • give the player an ESX notification of Soda buy if esoda/sprunk and coffee buy if coffee

Can you help me? Thanks.

1 Like

interested for sure :slight_smile:

‘p_ing_cofeecup_01’ just edit line 98 in client/main.lua like this:

local prop_name = prop_name or 'p_ing_coffeecup_01'

I only wrote the police station one. Here you are:

{x = 436.00,	y = -985.80, z = 30.69},

I need the same thing
If you want you can copy same resouce and changes names coords,prop name that will be work but it will be 2 resource file

You should make it based off the type of prop instead of needing cords for each location. Makes the resource much lighter.

Sounds like a great idea! Feel free to make a pull request once you’ve got that done! Thanks.

When we add this resource to our 1sync server then players ger crash thats normal ??

How about the soda machine inside the Pillbox Hospital does it work? I try to install the script but it only works on the police department and other all soda machines.

If it doesn’t work with that machine, you just have to get coords and add them in the config.lua file.

1 Like

Yea thanks I already figured it out yesterday too haha :slight_smile: