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

[3/19/2020] While you can use this resource if you’d like, and it is still fully functional, a (subjectively) better script is now available that I prefer even over my own. You can check it out here.

There’s not much to this script, but it helps people that might need a quick drink if they are about to die (assuming you use esx_basicneeds). It’s also kinda neat because it offers the beverages at a discounted fee of $1, at the cost of having to drink it right there and it not going into your inventory. All 82 of the machines in the game work. If I missed any coordinates, let me know and I’ll be glad to fix it ASAP. The sound effect is included for the machine, but is optional. Note - the sound effect requires InteractSound

Thanks and I hope this helps your communities!
Let me know if you’d like to see more like this!

Download: GitHub repo

Demonstration Video: YouTube video

Dependencies: esx_status, esx_basicneeds
[details=“Other resources pictured”]
Other scripts pictured: Basic UI (formerly es_pld), Time And Date Display, Simple Watermark, and esx_voice
[/details]

Special thanks to SilentRedBear for helping me test this.

[2/5/2020] This resource is provided as-is and I don’t have any further interest in messing with it; also my outlook on the ESX framework has changed quite a bit since then. At this point, I can not recommend the ESX framework in general due to exploits and other concerns.

You can check out my other works here:
Ultimate Vinewood Bowl [YMAP]
[Release] Temporator - A configurable in-game temperature display!
[Release] [ESX] ESX_JobWhitelisting - Whitelist jobs (and ranks!) to certain players!
[Release] [ESX] ESX_GetOut - Kick players for stealing emergency vehicles! [V1.1]

17 Likes

Nice script!

But why:
local blackout = Blackout

And where is IsAnimated defined?
Set local IsAnimated = false globally since you’re checking for if not IsAnimated then

Also, why include locales if you’re using it for only press_context

4 Likes

wow nice script probaly gonna be good in rp :slight_smile:

2 Likes

Nice script you have here this is a good idea love your work

1 Like

Great catch! That was from… um… something I was tinkering with… I’ll update the GitHub shortly when I get back to my PC.
Thanks for checking it out!

hello beautiful script when I put .ogg in the intercsound the sound is not heard :frowning:

1 Like

Make sure the .ogg file goes into /client/html/sounds/ for InteractSound. And also make sure you put it in your __resource.lua for InteractSound.

As always, thanks for checking it out! I’m glad you like it!

1 Like

where can i go to change the 1$ fee? i want to change it i tried lot of place in the client script… didnt work…

TriggerServerEvent('esx_SodaMachine:TakeMoney', 1) change to 10 or w/e

1 Like

the problem is that there is no money collected at all…
is says 1$ but no money taken from my bank or my pocket…

its telling me en locals missing for the interaction baiscally but when i look inside of EN its there? how can i fix this?

Just change it to FR. I forgot that I wrote the EN labels in the FR locale lol so just set it to FR for EN if that makes sense. Thanks for checking it out!

fixed ty

1 Like

I was working on animations and sound synchronisation.
Hope I’ll be able to release it soon :slight_smile:

5 Likes

Looking good man is it stable?

Yes it is, but I don’t use any esx. This script is a stand alone. That’s why I don’t share it. Think is useless for all xD

1 Like

Its not useless if you are willing to share your codes so someone can either improve or use it as a sample man! Keep improving!

1 Like

If I hadn’t abandoned the dev work on this script, I would consider implementing things like that. But at this point I have more ideas for more scripts and releases to come. Next release coming soon

I was delighted to put it on my server with my basicneeds edited and modified the sodamachine so that when you take the cocacola it will take away the desire to drink and increase your desire to piss it would be nice to put more drinks not only cocacola and activate all the machines that are not green also the red ones etc

There are only 2 props of can. The green one, and the red one.
Here, the script detect the Prop front of you. So all machine are enable.