[OUTDATED?][Release] esx-kr-advanced-shops - Next generation shop script (Robbery included) (NUI)

Hey! im getting this error :C why?

So i have a problem with the icons


this is supoost to look like this
image
everything in config file is set to ‘‘phone’’ as my database and even the /img/phone.png
what can i do to fix it?
image

Hello, I am looking to make select shops not have a blip. I see that I have to change something in the client lua. But I am dumb.

Reading through the comments I did not see this question ask, likely because it is beneath any of you, but it doesn’t hurt to ask.

Thank you in advance.

Go to client.lua and search AddEventHandler(‘esx_kr_shop:hasExitedMarker’, function(zone)

and add ESX.UI.Menu.CloseAll()

like this

AddEventHandler(‘esx_kr_shop:hasExitedMarker’, function(zone)
ESX.UI.Menu.CloseAll()
ShopId = nil
end)

Good luck! :smiley:

go to server.lua and search RegisterServerEvent(‘esx_kr_shops:Buy’) or – BUYING PRODUCT

and replace with this

– BUYING PRODUCT
RegisterServerEvent(‘esx_kr_shops:Buy’)
AddEventHandler(‘esx_kr_shops:Buy’, function(id, Item, ItemCount)
local src = source
local identifier = ESX.GetPlayerFromId(src).identifier
local xPlayer = ESX.GetPlayerFromId(src)

    local ItemCount = tonumber(ItemCount)

    MySQL.Async.fetchAll(
    'SELECT * FROM shops WHERE ShopNumber = @Number AND item = @item',
    {
        ['@Number'] = id,
        ['@item'] = Item,
    }, function(result)


    MySQL.Async.fetchAll(
    'SELECT * FROM owned_shops WHERE ShopNumber = @Number',
    {
        ['@Number'] = id,
    }, function(result2)

        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']      = result2[1].money + (result[1].price * ItemCount),
	    ['@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)
end)

end)

good luck !! :smiley:

the notification for the police does not work, does anyone know how to fix?

Did you add the png into _resource.lua

How can I turn on blips without having to manually. That is, if someone joins, they should be connected!


pls help

1 Like

How does one add another shop i want a seperate shop for tools

[script:es_extended] es_extended: TriggerServerCallback => [esx_kr_shop:getOwnedShop] does not exist
[ script:es_extended] es_extended: TriggerServerCallback => [esx_kr_shop:getShopList] does not exist

is it really dead now? Does anyone have a solution how to get it to work I am grateful for any help =)

My GameBuild is 2189