Functions Config

Easily integrate and modify notifications to fit your preferred notification script or framework.

-------------------
-- Notifications --
-------------------

RegisterNetEvent('op-garages:sendNotify')
AddEventHandler('op-garages:sendNotify', function(title, type, time)
    sendNotify(title, type, time)
end)

Citizen.CreateThread(function()
    sendNotify = function(title, type, time)
        -- Time in miliseconds 
        if Config.Notify == "esx" then
            Framework.ShowNotification(title, type, time)
        elseif Config.Notify == "qbcore" then
            Framework.Functions.Notify(title, type, time)
        elseif Config.Notify == "op-hud" then
            TriggerEvent('op-hud:showNotification', type, time, title) 
        end
    end
end)

Last updated