sc_Notify
Installation
Upload the files to your server.
Add
ensure notify
to yourserver.cfg
.Make sure to configure the
config.lua
to your liking in order to adjust the notification behavior.
Customizing Notifications
Notifications can be configured through the config.lua
file. The file offers various options to tailor the notifications to your preferences.
EnableTestCommand
Description: Toggles the test command on or off.
Values:
true
: The test command is active. You can use/testnotify
to send a test notification.false
: The test command is disabled.
NotifyPosition
Description: Determines where the notification will be displayed on the screen.
Values:
top-right
: Top righttop-left
: Top leftbottom-right
: Bottom rightbottom-left
: Bottom left
NotifyColors
Description: Defines the colors for the notification (background, text, border).
Fields:
background
: Background color (RGBA)text
: Text color (RGBA)border
: Border color (RGBA)
Example:
{ r = 255, g = 255, b = 255, a = 1 }
for white text
NotifyStyle
Description: Additional visual options for the notification.
Fields:
borderRadius
: Determines how rounded the corners of the notification are.shadow
: Enables or disables the shadow.shadowColor
: Determines the shadow color.
Usage
Sending a Test Notification
If the test command is enabled in the config.lua
(Config.EnableTestCommand = true
), you can enter the command /testnotify
in-game to see a test notification.
Sending Notifications from Other Scripts
Other plugins or scripts can also send notifications by triggering the notify:send
event. Example:
To send a notification with custom settings (e.g., colors and position):
Last updated
Was this helpful?