Notification
qb-core/client/functions.lua
function QBCore.Functions.Notify(text, texttype, length, icon)
local message = {
action = 'notify',
type = texttype or 'primary',
length = length or 5000,
}
if type(text) == 'table' then
message.text = text.text or 'Placeholder'
message.caption = text.caption or false
else
message.text = text
end
if icon then
message.icon = icon
else
message.icon = texttype == 'success' and 'fas fa-check' or texttype == 'error' and 'fas fa-exclamation-triangle' or 'fas fa-info'
end
exports['ZSX_UIV2']:Notification(message.caption, message.text, message.icon, message.length)
end
Last updated