Logo

DIVERSITY

Documentation

Modules

Notification

The Notification module provides notification systems for displaying messages, alerts, and status updates to players.

Client Functions


GetResourceName

Returns the name of the underlying notification resource being used.

client.lua
local resourceName = dBridge.Notification.GetResourceName()
Returned DataTypeDescription
resourceName
string
The name of the notification resource (e.g., "ox_lib").

Notify

Sends a notification to the player.

This function depends on the core framework's notification system. If your framework does not provide a built-in notification function (e.g., some standalone or custom setups), you must ensure one is configured in the bridge.

client.lua
dBridge.Notification.Notify('Hello World', 'success', 5000)
ArgumentTypeDescription
message
string
The notification message.
type?
'success' | 'error' | 'info' | 'warning'
The type of notification.
duration?
number
Duration in milliseconds.

Server Functions


GetResourceName

Returns the name of the underlying notification resource being used.

server.lua
local resourceName = dBridge.Notification.GetResourceName()
Returned DataTypeDescription
resourceName
string
The name of the notification resource (e.g., "ox_lib").

Notify

Send a notification to a specific player.

server.lua
dBridge.Notification.Notify(source, 'This is a notification', 'success', 5000)
ArgumentTypeDescription
source
number
The player ID (source).
message
string
The notification message.
type?
'success' | 'error' | 'info' | 'warning'
The type of notification.
duration?
number
Duration in milliseconds.

Was this page helpful?