🔧Installation Notify
This page explains how to integrate the 'Sweepz_Ui_Elements' script's notification system into other systems.
File Location: qb-core/client/functions.lua
Line Number: 171
function QBCore.Functions.Notify(text, texttype, length)
texttype = texttype or 'info'
length = length or 5000
if type(text) == 'table' then
local ttext = text.text or ''
local caption = text.caption or ''
TriggerEvent('Sweepz_Ui_Elements:SendAlert', caption, ttext, length, texttype)
return
end
TriggerEvent('Sweepz_Ui_Elements:SendAlert', 'Notification', text, length, texttype)
endFile Location: es_extended/client/functions.lua
Line Number: 156
function ESX.ShowNotification(message, type, length)
TriggerEvent('Sweepz_Ui_Elements:SendAlert', 'Notification', message, length, type)
endFile Location: ox_lib/resource/interface/client/notify.lua
Line Number: 33
function lib.notify(data)
local sound = settings.notification_audio and data.sound
data.sound = nil
data.position = data.position or settings.notification_position
TriggerEvent('Sweepz_Ui_Elements:SendAlert', data.title, data.description, data.duration, data.type, true, data.position)
if not sound then return end
if sound.bank then lib.requestAudioBank(sound.bank) end
local soundId = GetSoundId()
PlaySoundFrontend(soundId, sound.name, sound.set, true)
ReleaseSoundId(soundId)
if sound.bank then ReleaseNamedScriptAudioBank(sound.bank) end
endLast updated