Exports
Send SB Notify messages from client and server scripts.
Client export
exports['sbnotify']:Alert(caption, message, duration, type)
Send a notification to the local player.
| Parameter | Type | Description |
|---|---|---|
caption |
string |
Bold heading. Pass '' to omit it. |
message |
string |
Notification body. |
duration |
number |
Display duration in milliseconds. Uses Config.DefaultLength when omitted. |
type |
string |
A key in Config.Types. Unknown values use info. |
Lua
exports['sbnotify']:Alert('Police', 'You are now wanted!', 7000, 'police')
exports['sbnotify']:Alert('', 'You received $500.', 5000, 'cash')
exports['sbnotify']:Alert('Mechanic', 'Vehicle repair complete.', 5000, 'mechanic')Server exports
exports['sbnotify']:AlertPlayer(source, caption, message, duration, type)
Send a notification to one player.
| Parameter | Type | Description |
|---|---|---|
source |
number |
Player server ID. |
caption |
string |
Bold heading. |
message |
string |
Notification body. |
duration |
number |
Display duration in milliseconds. |
type |
string |
Notification type. |
Lua
exports['sbnotify']:AlertPlayer(source, 'Cash', 'Paycheck received: $1,200', 6000, 'cash')
exports['sbnotify']:AlertPlayer(source, 'Error', 'You are not whitelisted.', 5000, 'error')exports['sbnotify']:AlertAll(caption, message, duration, type)
Broadcast a notification to every connected player.
Lua
exports['sbnotify']:AlertAll('Server', 'Restart in 5 minutes.', 10000, 'warning')
exports['sbnotify']:AlertAll('Event', 'A new heist has started!', 8000, 'police')Client event
'sbnotify:client:Alert'
Use this event from the server when your workflow already uses TriggerClientEvent.
Lua
TriggerClientEvent('sbnotify:client:Alert', source, caption, message, duration, type)| Parameter | Type | Description |
|---|---|---|
source |
number |
Player server ID. Use -1 for every player. |
caption |
string |
Bold heading. |
message |
string |
Notification body. |
duration |
number |
Display duration in milliseconds. |
type |
string |
Notification type. primary maps to info. |
Lua
TriggerClientEvent('sbnotify:client:Alert', src, 'SB Storage', 'Item saved.', 5000, 'success')
TriggerClientEvent('sbnotify:client:Alert', -1, 'Server', 'Saving server data...', 5000, 'warning')QBCore integration
SB Notify overrides QBCore.Functions.Notify on the client.
Existing scripts work without changes. primary maps to info.
Lua
QBCore.Functions.Notify('Action completed!', 'success', 5000)
QBCore.Functions.Notify('Not enough money.', 'error', 5000)
QBCore.Functions.Notify('Welcome back.', 'primary', 5000)
QBCore.Functions.Notify('You died.')Notification stacking
Repeated type and message combinations do not create duplicates.
SB Notify increments a ×2, ×3, or higher badge. It also resets the timer.
Lua
exports['sbnotify']:Alert('', 'Not enough money.', 5000, 'error')
exports['sbnotify']:Alert('', 'Not enough money.', 5000, 'error')
exports['sbnotify']:Alert('', 'Not enough money.', 5000, 'error')Last updated 2026-11-08
