Notifications
Adding the notification system to your framework.
QBCore Implementation
function QBCore.Functions.Notify(text, textype, length)
if type(text) == "table" then
local ttext = text.text or 'Placeholder'
local caption = text.caption or 'Placeholder'
local icon = text.icon or 'fas fa-inbox'
local length = length or 3000
exports['ZSX_UI']:AddNotify(icon, caption, ttext, length)
else
local ttext = text or 'Placeholder'
local length = length or 5000
exports['ZSX_UI']:AddNotify('fas fa-inbox', 'Notification', ttext, length)
end
endESX Implementation
function ESX.ShowNotification(message, type, length)
if Config.NativeNotify then
BeginTextCommandThefeedPost('STRING')
AddTextComponentSubstringPlayerName(message)
EndTextCommandThefeedPostTicker(0, 1)
else
exports['ZSX_UI']:AddNotify('fas fa-inbox', 'Notification', message, length)
end
endUsage
Structure
Export
Event
Last updated