(UPDATE-11/12/2019) [Release] [ESX] Shops with bars (V.1.7) (OLD ESX)

Did you add the imgs for the items?
And the sql file to the database?

How big do the imgs have to be? and just have them named the same as the database file name right?

1 Like

Hey do you know how i can make them the same as the other pngs, and what size does the png have to be. Thankyou!! image|608x247

1 Like

You can use online convertrs to make them png, and use water and bread images as an example!

The images can be the size that you want, and yes they need to have the same name as the items in the database, don’t forget to add them in the __resource.lua too

Yeah i did that. It’s still not showing other items in the shops that I know are there.

when i try to buy something from the shop. No response and this appear in the server console.
@esx_shops/server/main.lua:124: attempt to compare nil with number
How to solve this?

hello, I too have this error. How to solve this?

Where can I replace the default icons?

@SJDaryl @Stephen_Lo I had the same error. For some reason, when this script is calling for the item limit, it’s not finding it and returning a nil value (at least for us). For now, since I can’t find a way to fix this, I changed line 124 in esx_shops/server/main.lua to:
if (sourceItem.count + amount) > 30 then
This sets all item limits bought through esx_shops to 30, but that’s okay with me until I can find a fix. I believe we few may have installed something wrong or be missing something, even though I have esx_addoninventory.

Side note: This is an awesome script David, and I thank you for the neat interface you made!

PS: If anyone knows why the item limits are not being found in the database (or wherever this script is calling them from), please help us. Thank you!

2 Likes

its because of the new version of extended and their weight system i’ll update my script soon!

sorry guys!

1 Like

I know I speak for myself and the others when I say that we appreciate it David. No rush man, thank you for your time and dedication to the community. :+1:

Also, I have a question that’s indirectly linked to this topic, but if anyone can help me, that would be great;
I tried the original esx_shops, and in that script, they use the new weight system. I know that my scripts and framework are all updated, I’ve even looked at the scripts to make sure that weight can be called upon, but for some reason it still returns a nil value. Like I said, everything’s updated, and I’m talking about the original esx_shops, but the weight still isn’t found.
Any ideas? If not that’s okay, and I realize this is a separate issue from this script.

I’m gonna take another look at home to make sure their SQL entries are correct. Maybe this is a missing column in the tables for items or users…

help me why i getting this

server thread hitch warning: timer interval of 1466 milliseconds
esx_shops: invalid item “bread” found!
esx_shops: invalid item “water” found!
esx_shops: invalid item “bread” found!
esx_shops: invalid item “water” found!
esx_shops: invalid item “bread” found!
esx_shops: invalid item “water” found!
esx_shops: invalid item “chocolate” found!
esx_shops: invalid item “chocolate” found!
esx_shops: invalid item “chocolate” found!
esx_shops: invalid item “sandwich” found!
esx_shops: invalid item “sandwich” found!
esx_shops: invalid item “sandwich” found!
esx_shops: invalid item “hamburger” found!
esx_shops: invalid item “hamburger” found!
esx_shops: invalid item “hamburger” found!
esx_shops: invalid item “cupcake” found!
esx_shops: invalid item “cupcake” found!
esx_shops: invalid item “cupcake” found!
esx_shops: invalid item “chips” found!
esx_shops: invalid item “chips” found!
esx_shops: invalid item “chips” found!
esx_shops: invalid item “cocacola” found!
esx_shops: invalid item “cocacola” found!
esx_shops: invalid item “cocacola” found!
esx_shops: invalid item “icetea” found!
esx_shops: invalid item “icetea” found!
esx_shops: invalid item “icetea” found!
esx_shops: invalid item “coffe” found!
esx_shops: invalid item “coffe” found!
esx_shops: invalid item “coffe” found!
esx_shops: invalid item “milk” found!
esx_shops: invalid item “milk” found!
esx_shops: invalid item “milk” found!
esx_shops: invalid item “cigarett” found!
esx_shops: invalid item “lighter” found!
esx_shops: invalid item “cigarett” found!
esx_shops: invalid item “lighter” found!
esx_shops: invalid item “cigarett” found!
esx_shops: invalid item “lighter” found!
esx_shops: invalid item “beer” found!
esx_shops: invalid item “wine” found!
esx_shops: invalid item “vodka” found!
esx_shops: invalid item “tequila” found!
esx_shops: invalid item “whisky” found!
esx_shops: invalid item “cigarett” found!
esx_shops: invalid item “lighter” found!
esx_shops: invalid item “beer” found!
esx_shops: invalid item “wine” found!
esx_shops: invalid item “vodka” found!
esx_shops: invalid item “tequila” found!
esx_shops: invalid item “whisky” found!
esx_shops: invalid item “gintonic” found!
esx_shops: invalid item “absinthe” found!
esx_shops: invalid item “champagne” found!
esx_shops: invalid item “cigarett” found!
esx_shops: invalid item “lighter” found!

Thank you for this awsome script ! Evrything works 100% if you follow the instructions !

Question : How to add a new item in stores ? for ex: Acetone ( for meth cooking ).
I added the item in config esx_shops and also in basic needs, added pics in __resource, I have it in DB shops and items, but it doens’t show up in menu, what do i miss ?

Other thing if someone can explain or help me out with this error :
image

image

Even if i get this erorr the scripts works great but i just wonder how to fix adding the item and this error.
Thank you !

Make sure you have both the esx_basicneeds & esx_shops from David (the OP) installed correctly and running on your server.
Then make sure you also have the correct tables (‘items’ and ‘shops’) in your database with the entries listed above in both ('items" will look a little different with the ‘limit’ column, and 'shops will look a little different with the ‘price’ column. One of these tables also has an ‘ID’ column, which I believe is ‘items’.

1 Like

That error is due to the new weight system in esx vs the old limit system. He’s working on modifying his script to utilize this. For now, you can use my temp fix above.
As for adding items, I’d also take a look at what you need to modify (if anything) in the html’s or css folder.

1 Like

Thank you for the reply, I just erased everything in my DB and tried a new method, now i can see my new items and everything.

1 Like

Awesomeness. What was the method you used?

I was adding the id’s myself, I had the items in shops and items with PRIMARY KEY (id) and the items usable in basic needs still couldn’t see them. So i erased everything in items and shops and started over again with id int(11) NOT NULL AUTO_INCREMENT, and after that i could see my new items in shop.

Now i’m trying to figure it out how to get health adding a medikit in shop and how to use it with ESX.RegisterUsableItem. I’m new to coding so if you guys can help that would be really awsoeme.

2 Likes