API Reference
Client API Reference
Exports
CreateNotification
The main function for creating notifications.
Parameters
{
type = string, -- 'success', 'error', 'info', 'warning'
message = string, -- The notification message
title = string, -- (Optional) Title for advanced style
position = string, -- (Optional) Screen position
duration = number -- (Optional) Duration in milliseconds
}Examples
-- Basic usage
exports['b2-sleeknotify']:CreateNotification({
type = 'success',
message = 'Basic notification'
})
-- Full options
exports['b2-sleeknotify']:CreateNotification({
type = 'success',
title = 'Operation Complete',
message = 'Action was successful',
position = 'TOP_RIGHT',
duration = 5000
})Events
notifications:create
Event that can be triggered to create a notification.
Usage
Server API Reference
Exports
SendNotificationToPlayer
Send a notification to a specific player.
SendNotificationToAll
Send a notification to all players.
Events
notifications:server:create
Server event to create notifications.
Common Use Cases
Server Announcements
Player-Specific Notifications
Last updated