[ESX] [Supermarket]

I have other name of shops in database , how i can change it in script to loading “sklep” not “shops”

When I add icons and add them in resource.lua. For an example, I added cigarett as png picture, and the item in the shop (database). When I go to the shop and open the menu I cant see the picture. Any clues?

You probably didnt add the image to the __resource.lua file. That, or the image name is not the same as the item name in the db

I’ll try again and we’ll hope it will work, thanks for the answer Kind Regards

Change line 25 in server/main.lua to your table name,
local shopResult = MySQL.Sync.fetchAll('SELECT * FROM shops')

Did you change anything in server.lua?
Can you post line 40? It doesn’t make scenes when i look into the code line 40!

Please check if this version solves your problem.

1 Like

I will try it and hopefully it works, thanks.

The developers in ESX are growing faster, damn your works are better than unique other frameworks.

i installed the resource and when I go to the store I do not get any object and I get this error can someone help me

 Error resuming coroutine: citizen:/scripting/lua/scheduler.lua:762: No such export mysql_sync_fetch_all in resource mysql-async
stack traceback:
        [C]: in function 'error'
        citizen:/scripting/lua/scheduler.lua:762: in metamethod '__index'
        @mysql-async/lib/MySQL.lua:57: in field 'fetchAll'
        @esx_supermarket/server/main.lua:24: in function 'LoadShop'
        @esx_supermarket/server/main.lua:18: in function <@esx_supermarket/server/main.lua:14>

Nice work !! Thank you.

On my server is working well. I just replaced old esx_shops with this one (esx_supermarket).

Nice work. followed all your steps + these and have it working with esx_shops_with_bars so have the nice gui even in the bars and shops now.

You need mysql-async

1 Like

Is it possible to change the position of the menu in the middle of the screen?

Change top and right properties of .shop-container in html/styles.css

When i open shop im stuck i can add more items to basket , but can’t buy and leave shop when i click on “X” and yes someone attacks me and i can’t xD win

1 Like
  • how to add more items i have 20 items but there i see only 10 but 2 times the same items

Items don’t show up. I take this error.
Error resuming coroutine: @esx_supermarket/server/main.lua:43: attempt to index a nil value (field ‘?’)
stack traceback:
@esx_supermarket/server/main.lua:43: in function ‘LoadShop’
@esx_supermarket/server/main.lua:10: in upvalue ‘handler’
citizen:/scripting/lua/scheduler.lua:219: in function citizen:/scripting/lua/scheduler.lua:218

Items are on the database.
https://gyazo.com/4fb9b678ee2f7ccb39260ed3a109a15a
https://gyazo.com/9aac8034514770e923eb189b5e36fbf7

Any fix please?

EDIT: FIXED.
Solution.
Delete table ‘shops’ and upload esx_shops.sql from esx_supermarket resource.

where did you get your icons next to the item names from if you dont mind me asking been trying to find them my self but can only find ones not colored

You mean emoji ? like this :sneezing_face: