[Release] [ESX] Shops UI

U need to add like this img/filename.png and u must define that in fxmanifest.lua and yes u need to create img folder inside html folder

ā€œServer requested resource esx_shops to be stopped, but we dont know that resourceā€ Anyone know why this is happening?

SCRIPT ERROR: @esx_shops/server/main.lua:61: attempt to call a nil value (field ā€˜canCarryItem’)

2 Likes

change that line with this

this 
if xPlayer.canCarryItem(itemName, amount) then

to this
if sourceItem.limit ~= -1 and (sourceItem.count + amount) > sourceItem.limit then

then it will look like this


if sourceItem.limit ~= -1 and (sourceItem.count + amount) > sourceItem.limit then
	TriggerClientEvent('mythic_notify:client:SendAlert', source, { type = 'inform', text = 'Your backpack is too heavy to carry so many things.', length = 2500, style = { ['background-color'] = '#2f5c73', ['color'] = '#FFFFFF' } })

else
	xPlayer.removeMoney(price)
	xPlayer.addInventoryItem(itemName, amount)	
	TriggerClientEvent('mythic_notify:client:SendAlert', source, { type = 'inform', text = 'You bought ' .. amount .. ' x ' .. itemName .. ' for ' .. price .. '$', length = 2500, style = { ['background-color'] = '#2f5c73', ['color'] = '#FFFFFF' } })

end

still not work

SCRIPT ERROR: @esx_shops/server/main.lua:61: attempt to index a nil value (global ā€˜sourceItem’)

@jamesyyq73 need to define sourceItem like

local xPlayer = ESX.GetPlayerFromId(_source)

local sourceItem = xPlayer.getInventoryItem(itemName)

Can you help me? Anything wrong, there nothing in shops.
image
image

Upload image to any hosting.

1 Like

U did \ but u need to change it to / in database so it should be (img/game-icon.png)

1 Like

Can you give me the site to arrange the images

have you found a solution?

@NeQ
Sorry for bothering, I downloaded last version from the Github, but still, when I enter marker, it does not open WeaponShop gui ?
Could you please help ?

EDIT:
Nevermind, it does not open shop because AmmuNation is set as LEGAL in the config, which means you need license

how should the database table look like? because mine haven’t changed at all and I’m assuming that is why I don’t have any icons ingame at all…

I’m having an issue where the item won’t purchase when I click on it in the shop, can anyone help me out?

I’m stuck with cannot purchase items

When i get home i’ll upload my version with images and. Sql file

2 Likes

here , this is my version
esx_shops.rar (111.9 KB)

4 Likes

deer, i got this popup after get into the server, how do i fix it?

I have one simple problem. When i come out from shop ui i can’t move.

Hello, how can I put more than 12 articles but without it coming out and being super ugly