Please make it yourself easier. Change your __resource.lua to:
resource_manifest_version '44febabe-d386-4d18-afbe-5e627f4af937'
ui_page('html/index.html')
files({
'html/index.html',
'html/script.js',
'html/style.css',
'html/img/*.png'
})
client_scripts {
'config.lua',
'client/main.lua',
'@es_extended/locale.lua',
'locales/en.lua',
'locales/fr.lua',
'locales/sv.lua',
}
server_scripts {
'config.lua',
'server/main.lua',
'@mysql-async/lib/MySQL.lua'
}
1 Like
Snoop25
January 23, 2020, 10:07pm
433
Hi, I have this error.
Can anyone help me please ?
SCRIPT ERROR: @disc-inventoryhud /server/inventory.lua:554: attempt to compare number with string
ref (@es_extended /server/classes/player.lua:326)
ref (@esx-kr-advanced-shops /server/main.lua:276)
setImmediate (@mysql-async /mysql-async.js:14431)
AdamSizar:
ete list image
I think you mean just delete the images it adds to the database, i did that and still no images are working. Im at a loss. my __resource.lua looks exactly like the one posted (where is says 'html/img/*.png)
My config, shows the items listed, with the directory for the images… ive got now idea.
1 Like
drakaro
February 6, 2020, 10:57am
435
Hi there, no one found fix for the problem with multiple buy ? lie @AdamSizar ( (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, )
1 Like
did you fix it i get delay after 60 players on server
1 Like
drakaro
February 13, 2020, 6:55pm
437
no one fix the probleme when purshase multiples items ???
1 Like
fixed problem when purshase multiples items
Before
if xPlayer.getMoney() < ItemCount * result[1].price then
TriggerClientEvent('esx:showNotification', src, '~r~You don\'t have enough money.')
elseif ItemCount <= 0 then
TriggerClientEvent('esx:showNotification', src, '~r~invalid quantity.')
else
xPlayer.removeMoney(ItemCount * result[1].price)
TriggerClientEvent('esx:showNotification', xPlayer.source, '~g~You bought ' .. ItemCount .. 'x ' .. Item .. ' for $' .. ItemCount * result[1].price)
xPlayer.addInventoryItem(result[1].item, ItemCount)
MySQL.Async.execute("UPDATE owned_shops SET money = @money WHERE ShopNumber = @Number",
{
['@money'] = result2[1].money + (result[1].price * ItemCount),
['@Number'] = id,
})
if result[1].count ~= ItemCount then
MySQL.Async.execute("UPDATE shops SET count = @count WHERE item = @name AND ShopNumber = @Number",
{
['@name'] = Item,
['@Number'] = id,
['@count'] = result[1].count - ItemCount
})
elseif result[1].count == ItemCount then
MySQL.Async.fetchAll("DELETE FROM shops WHERE item = @name AND ShopNumber = @Number",
{
['@Number'] = id,
['@name'] = result[1].item
})
end
end
end)
After
if xPlayer.getMoney() < ItemCount * result[1].price then
TriggerClientEvent('esx:showNotification', src, '~r~You don\'t have enough money.')
elseif ItemCount <= 0 then
TriggerClientEvent('esx:showNotification', src, '~r~invalid quantity.')
else
xPlayer.removeMoney(ItemCount * result[1].price)
TriggerClientEvent('esx:showNotification', xPlayer.source, '~g~You bought ' .. ItemCount .. 'x ' .. Item .. ' for $' .. ItemCount * result[1].price)
xPlayer.addInventoryItem(result[1].item, ItemCount)
local result3 = (ItemCount * result[1].price)
MySQL.Async.execute("UPDATE owned_shops SET money = money + @money WHERE ShopNumber = @Number",
{
['@money'] = result3,
['@Number'] = id,
})
if result[1].count ~= ItemCount then
MySQL.Async.execute("UPDATE shops SET count = @count WHERE item = @name AND ShopNumber = @Number",
{
['@name'] = Item,
['@Number'] = id,
['@count'] = result[1].count - ItemCount
})
elseif result[1].count == ItemCount then
MySQL.Async.fetchAll("DELETE FROM shops WHERE item = @name AND ShopNumber = @Number",
{
['@Number'] = id,
['@name'] = result[1].item
})
end
end
end)
THIS IS FIXED
3 Likes
hay If Have Proplem
In Image In Shop Delete Items In Shops Have old Image Or Not Have Image In Sql
My issue was super simple the entire time… all I had to do was remove the items and readd them. Then thre images worked
1 Like
Thats Right Its Very simple
I am having a problem when everytime I click on boss menu it nothing happens what can I do to fix that problem
drakaro
February 18, 2020, 9:59am
444
@AdamSizar
i have copy post what u said, but i got this error now …
es_extended: TriggerServerCallback => [esx_kr_shop:getOwnedBlips] does not exist
es_extended: TriggerServerCallback => [esx_kr_shop:getOwnedBlips] does not exist
any idea ?
drakaro
February 18, 2020, 10:02am
445
this is ths script i have : main.lua (19.7 KB)
When i put the old, everything working well except this multiple purshase bug, but when i put the fix u give me, error :s can u help ? :s
XDope
February 19, 2020, 10:02am
446
this is awelsome man, txk for u release…but the file STL is empy??? not have a item il database…u can take me a sql with item base…for example bread and water? pls
You Use New es_extended And Item limit or weight
Any idea? I buy one shop and go to shop , click E and show this error
Sometime users can not pick the delivery
Kette
March 22, 2020, 9:28am
451
Hi,
I have a problem, entering the money in the boss’s account, it multiplies by two,I enter 100 and it takes 200, do you know if there is another dependency that can give this error?
Very good work, Thanks