[DISCONTINUED] esx-kr-advanced-shops

no still cant figure it out

Did anyone manage how to solve the problem that when someone buying the multiple items from the shop, the owner only gets money for the first item?
(ex: buying 10$ for water and 50$ for bread at once, shop only receive 10$ for water, but the player pays it without error.)
Really needs help or any advisement, we have been debugged at least one week… this is the only one we haven’t figure it out.

you’ll have to edit the code to do that. You will have to create a menu (Ex. like when you check out of the store when buying your items it gives you the shopping cart) or use the shopping cart menu/hud and make it look like how you wish, then you’ll have to add your new menu into the code. I wouldn’t recommend going through all that just to make edits but it is up to you. I would say if you know how to do that I would suggest just writing your own script.

Stores have blips, but only if they are owned by a player. You can easily change that in the code if you wish :).

Please post screenshots of any errors you may get in your console or server console.

how can i change the shop picture, im talking like the one in the video provided where it have your logo

Can i get the info how you did this? do both scripts try to pull from same shops table in DB?

I changed the the code a bit. So both of them use a different database.

Its pretty easy. There 3 database tables that are called.

  1. owned_shops
  2. shipments
  3. shops

Change all the calls for shops to something different. Mine are shopscustom.

How i did it. Changed the shops database name (for esx_shops) to shops1
Imported the database for this script. Changed the name the shopscustom and changed the database name back to shops for the esx_shops script.

Then i changed every call for shops in the server main.lua to shopscustom and your done.

Example on line 26

‘SELECT count, item FROM shopscustom WHERE item = @item AND ShopNumber = @ShopNumber’,

1 Like

i know you fixed this already but I would like to point out your issue.

“SELECT label, name, limit FROM items WHERE name = ‘wool’”: ER_PARSE_ERROR: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ‘limit FROM items WHERE name = ‘wool’’ at line 1e[0m

Look at - name = ‘wool’” notice how it has extra quotes? That was your issue

I found a small bug, and am not quite sure how to fix it.

When you own a store, and also have additional characters, those characters have access to the store boss functions.

I assume its checking for the Boss via steam ID or something, is there an easy way to change this?

Also, i cant get my images to work for anything, ive tried with html/ and without… can someone look at this and tell me what i may be doing wrong?

Thank you!

Please do not include all images. Use : *.png isntead

Like:

__resource.lua

files({
‘html/index.html’,
‘html/script.js’,
‘html/style.css’,

‘html/img/*.png’
})

Also: rule 14 (item name does NOT include .png, remove it!)

If dutchplayers advice is not enough.

https://gyazo.com/9a0396a85a13b78235aef786158afc8b

thats exactly how my __resource.lua looks now.

So, i dont list the images like:
/html/img/item.png

I use:
/html/img/*.png
instead?

Also, what do you mean about item name not including .png? none of mine do, all my items are category_name

Example:
food_water, tool_lockpick, drug_joint. i have the item names listed as such in the config.items table

Someone is having problem when buying an item, suppose (Ex: Water = 10 $, Bread = 10) when I buy two items at the same time it is only the first one I bought, in case it was to have 20 $ in the warehouse my store, but it is only 10 $ and the other 10 $ she did not charge,

delete list image in sql

Dont know if this is the same problem your having.

I have not tested it if its working. (im duqino)