Notify
client/custom/notify
Config.Notify = 'default' -- default, custom
if Config.Notify ~= 'default' then
return
end
local vRP
if Config.Framework == 'vrp' then
vRP = Proxy.getInterface('vRP')
end
function Notify(message, type)
if Config.Framework == 'qb-core' then
TriggerEvent('QBCore:Notify', message, type)
elseif Config.Framework == 'qbox' then
exports['qbx_core']:Notify(message, type)
elseif Config.Framework == 'esx' then
TriggerEvent('esx:showNotification', message, type)
elseif Config.Framework == 'vrp' then
vRP.notify({ message, type })
end
end
server/custom/notify
Config.Notify = 'default' -- default, custom
if Config.Notify ~= 'default' then
return
end
local vRPClient
if Config.Framework == 'vrp' then
local Tunnel = module('vrp', 'lib/Tunnel')
vRPClient = Tunnel.getInterface('vRP', 'gang-activities')
end
function Notify(source, message, type)
if Config.Framework == 'qb-core' then
TriggerClientEvent('QBCore:Notify', source, message, type)
elseif Config.Framework == 'qbox' then
exports['qbx_core']:Notify(source, message, type)
elseif Config.Framework == 'esx' then
TriggerClientEvent('esx:showNotification', source, message, type)
elseif Config.Framework == 'vrp' then
vRPClient.notify(source, { message, type })
end
end
Last updated
Was this helpful?