Skip to content

qb-shop

Link: https://github.com/qbcore-framework/qb-shops

Open qb-shops/client/main.lua find line 125

CreateThread(function()
    for store, _ in pairs(Config.Locations) do
        if Config.Locations[store]["showblip"] then
            StoreBlip = AddBlipForCoord(Config.Locations[store]["coords"][1]["x"], Config.Locations[store]["coords"][1]["y"], Config.Locations[store]["coords"][1]["z"])
            SetBlipColour(StoreBlip, 0)

            if Config.Locations[store]["products"] == Config.Products["normal"] then
                SetBlipSprite(StoreBlip, 52)
                SetBlipScale(StoreBlip, 0.6)
            elseif Config.Locations[store]["products"] == Config.Products["coffeeplace"] then
                SetBlipSprite(StoreBlip, 52)
                SetBlipScale(StoreBlip, 0.6)
            elseif Config.Locations[store]["products"] == Config.Products["gearshop"] then
                SetBlipSprite(StoreBlip, 52)
                SetBlipScale(StoreBlip, 0.6)
            elseif Config.Locations[store]["products"] == Config.Products["hardware"] then
                SetBlipSprite(StoreBlip, 402)
                SetBlipScale(StoreBlip, 0.8)
            elseif Config.Locations[store]["products"] == Config.Products["weapons"] then
                SetBlipSprite(StoreBlip, 110)
                SetBlipScale(StoreBlip, 0.85)
            elseif Config.Locations[store]["products"] == Config.Products["leisureshop"] then
                SetBlipSprite(StoreBlip, 52)
                SetBlipScale(StoreBlip, 0.6)
                SetBlipColour(StoreBlip, 3)
            elseif Config.Locations[store]["products"] == Config.Products["mustapha"] then
                SetBlipSprite(StoreBlip, 225)
                SetBlipScale(StoreBlip, 0.6)
                SetBlipColour(StoreBlip, 3)
            elseif Config.Locations[store]["products"] == Config.Products["coffeeshop"] then
                SetBlipSprite(StoreBlip, 140)
                SetBlipScale(StoreBlip, 0.55)
            elseif Config.Locations[store]["products"] == Config.Products["casino"] then
                SetBlipSprite(StoreBlip, 617)
                SetBlipScale(StoreBlip, 0.70)
            end

            SetBlipDisplay(StoreBlip, 4)
            SetBlipAsShortRange(StoreBlip, true)
            BeginTextCommandSetBlipName("STRING")
            AddTextComponentSubstringPlayerName(Config.Locations[store]["label"])
            EndTextCommandSetBlipName(StoreBlip)
        end
    end
end)

Replace the code with the following

CreateThread(function()
    for store, _ in pairs(Config.Locations) do
        if Config.Locations[store]["showblip"] then
            local sprite = 52
            local color = 0

            if Config.Locations[store]["products"] == Config.Products["normal"] then
                sprite = 52
            elseif Config.Locations[store]["products"] == Config.Products["coffeeplace"] then
                sprite = 52
            elseif Config.Locations[store]["products"] == Config.Products["gearshop"] then
                sprite = 52
            elseif Config.Locations[store]["products"] == Config.Products["hardware"] then
                sprite = 402
            elseif Config.Locations[store]["products"] == Config.Products["weapons"] then
                sprite = 110
            elseif Config.Locations[store]["products"] == Config.Products["leisureshop"] then
                sprite = 52
                color = 3
            elseif Config.Locations[store]["products"] == Config.Products["mustapha"] then
                sprite = 225
                color = 3
            elseif Config.Locations[store]["products"] == Config.Products["coffeeshop"] then
                sprite = 140
            elseif Config.Locations[store]["products"] == Config.Products["casino"] then
                sprite = 617
            end

            exports.bzn_blip_handler:RegisterBlip('general', Config.Locations[store]["label"], vector2(Config.Locations[store]["coords"][1]["x"], Config.Locations[store]["coords"][1]["y"]), sprite, color)
        end
    end
end)lua

Remember to register a group called general.