Skip to content

Instantly share code, notes, and snippets.

View itsP33t's full-sized avatar

Petr Koukal itsP33t

View GitHub Profile
@itsP33t
itsP33t / notify.lua
Created March 18, 2023 22:53
Notification function that supports a lot of notification providers. Feel free to add more if you know some
function Notify(title, text, length, type, src)
if IsDuplicityVersion() then
-- Running on server
if Config.Notify == "qb" then
-- https://docs.qbcore.org/qbcore-documentation/qb-core/client-event-reference#qbcore-notify
TriggerClientEvent("QBCore:Notify", src, text, type, length)
elseif Config.Notify == "okok" then
-- https://docs.okokscripts.io/scripts/okoknotify
TriggerClientEvent('okokNotify:Alert', src, title, text, length, type)
elseif Config.Notify == "es.lib" then