[ESX/ExM] viv_snackies -- Add a bit more food and beverages to your ESX/ExM server

Hi, this is the first simple script I wrote that adds a few more items to your ESX/ExM server. Things added include:

Burger, Pizza, Chips, Fried Chicken, Donut, Ice tea, Coca cola, Coffee, Monster energy drink, Redbull, and a few alcoholic beverages.

Link: https://github.com/Vivi4n/viv_snackies

Fairly new to making ESX/ExM scripts. Most of what is done is taken from esx_status and esx_basicneeds.

Requirements:
es_extended or extendedmode (ESX/ExM)
esx_status: https://github.com/ESX-Org/esx_status
esx_basicneeds: https://github.com/ESX-Org/esx_basicneeds
esx_optionalneeds: https://github.com/ESX-Org/esx_optionalneeds

And of course, importing viv_snackies.sql to your database.

Disclaimer: This is just a general overview on how easy it is to add items and call functions from other scripts. You can use this and modify this to your liking, however much you want.

Todo:

  1. Not use esx_basicneeds for edibles/drinkables, look at props for every relevant item and create a client side script to handle that so it looks more different.
  2. Not use esx_optionalneeds for drunkenness level. I’d honestly like to use my own implementation in the future.
10 Likes

Thank you for sharing this!
Keep up the good work.

2 Likes

Why can i not eat them?

Nice set up! Thank You

2 Likes

They are registered as usable items in server.lua. Are you sure you have all the dependencies listed?

Edit: Just noticed that friedchicken is supposed to be fried_chicken in the SQL file. My bad. Repo updated.

2 Likes

yes i have everything installed and working

Do you all have the same water bottle and hamburger animations?

As of right now, yes, as it’s described. There is no client side script, it’s all functions called from others. The idea is to have it in the future and call it instead, with a different prop for every item.

1 Like

This isn’t original in any way. It’s just some registered items that is usable, just like esx_basicneeds. It’s the exact same but with some other items. At least, if you are going to release something, make something that isn’t copied or remake it, like adding other props as when you eat that item or whatever. That makes it original, but this isn’t.

Yeah, if anyone actually took the time to read the description… (’: would’ve been nice.

1 Like

They never said it was original. They just shared some items they made. Some newer people probably find this helpful or if they don’t want to add all the items themselves they can use this. Not every resource out there is going to be super advanced. Just be glad they’re contributing to the forum in a healthy manner than just downloading resources and never saying anything. If you don’t find it useable then just don’t use it :woman_shrugging: OP stated where it came from and that it demonstrates ease of use to adding items.

They also have plans to expand on this such as adding animations/props on a per item basis. This is a little tedious since they’d need to find the props and attach them properly to the player.

It’s still a helpful release even if it doesn’t help you personally. Like the McDonald’s items., you can now use those items with the McDonald’s Job. There’s uses for everything by someone. Even those weird admin cars people make.

8 Likes

hi i seem to be having an issue where the alcohol this script adds isn’t usable for some reason

We have installed this script putt evrything in the item list and the shop but when we go to the shop items are not showing, so there are not visible in the shop do we need to something more to see them?

Read the forum rules and you will understand what I mean with that I said.

I’ve added one of the items to the shop, but when i buy it it says i don’t have free space in the inventory, which is not true because i have only 2 used out of 30

Any fix for that?

1 Like

maybe u have set the limit on 0

Hey, I’m new, just started pc and fivem a few months ago, I’ve been having trouble adding food to basic needs, it always takes away the option to eat or drink when I try, so I downloaded your script, but I’m unsure of what to do to get the food, I tried spawning it, I don’t know where to find it in game, could you or anyone else help me, thank you for your time.

1 Like

Ok peoples! I have returned with some knowledge, i learned how to add food through this resource and have now added over 300 foods, so when you add anything to basic needs you MUST restart the server or it wont let you eat, or you can start off like me, simply copy and paste whats in vivs snacks and add onto it so if you mess up you can simply stop the resource and figure it out versus it affecting all the necessary food in your server like bread and water.
So from the script you learn that you need the items to match whats in your database, I actually go to the sql file, add alot of food items, and upload it that way or go to your database, items, find the last item, copy it, edit it to reflect the new food item, CHECK THE LIMIT, if you dont it wont work, this determines how much of that food you can hold.
After that go to locales file, copy, paste, fill in the new food item there, I could be missing a step but hopefully not as I am still learning myself, I just figured I’d reach back to let them know this did help me learn something.
Never let people tell you that you cant do it, dont let people put you in a box, make you feel like you learning too slow or are dumb for looking into things like this, it doesnt mean youre looking for a handout, it doesn’t make you lazy.
I spend more time looking at code than i do playing in my server, I study day and night but it doesnt matter as much because either the best scripts lack support, or they are so outdated that your issue can be exclusive to you and noone knows the answer, so they criticize you for either having a server and not knowing all the answers, or not being rich enough to pay a developer for issues that even he may not understand.
Your server is your responsibility at the end of the day, you bear that weight alone.

Learn at your own pace, it is best to have 2 servers, one a test server and the other your main server but also as a backup, always keep a backup of your stuff and understand that if you bought your server (it happens), alot of times the scripts are leaked and outdated, and for everyone you fix, 2 others may break, the benefit of paid scripts is supporting the direction of the developer and the support and optimization. I hope this helps anyone, see you around ofcourse, good luck to you server friend!

1 Like