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.
local resourceName = dBridge.Notification.GetResourceName()| Returned Data | Type | Description |
|---|---|---|
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.
dBridge.Notification.Notify('Hello World', 'success', 5000)| Argument | Type | Description |
|---|---|---|
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.
local resourceName = dBridge.Notification.GetResourceName()| Returned Data | Type | Description |
|---|---|---|
resourceName | string | The name of the notification resource (e.g., "ox_lib"). |
Notify
Send a notification to a specific player.
dBridge.Notification.Notify(source, 'This is a notification', 'success', 5000)| Argument | Type | Description |
|---|---|---|
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. |