Page cover

Editable Files

local fw = exports["G9-core"]:getFw()
local G9Core = exports["G9-core"]:core()

function notify(msg, msgType)
    if fw then
        return G9Core.Functions.Notify(msg, msgType, 2500)
    elseif not fw then
        return G9Core.ShowNotification(msg,msgType)
    else
        return nil
    end
end

RegisterNetEvent('g9-vehicleshop:client:sendNotify')
AddEventHandler('g9-vehicleshop:client:sendNotify', function(msg, _type)
    notify(msg, _type)
end)

CreateThread(function()
    for k,v in pairs(cfg.VehicleShops) do
        coords = v.blip.coords
        blipConfig = v.blip
        if blipConfig.display then
            local blip = AddBlipForCoord(coords.x, coords.y, coords.z)
            SetBlipSprite(blip, blipConfig.sprite)
            SetBlipColour(blip, blipConfig.color)
            SetBlipScale(blip, blipConfig.size)
            SetBlipAsShortRange(blip, true)
            BeginTextCommandSetBlipName("STRING")
            AddTextComponentString(blipConfig.text)
            EndTextCommandSetBlipName(blip)
        end
    end
end)

Last updated