Note
This HUD is compatible with fnbar-hud, meaning if you also have this resource installed on your server, players can change default colors of notification in the hud settings.
- Download the repository
- Put the
fnbar-notifyfolder in your resources directory - Add
ensure fnbar-notifyto your server config
exports['fnbar-notify]:showNotification(data)
The data table accepts the following properties:
| Key | Type | Description |
|---|---|---|
message |
string |
The main text of the notification. Required. |
title |
string |
The title of the notification. Required. |
duration |
number |
The duration of the notification in milliseconds. Default: 5000. |
mainColor |
string |
The main color of the notification (e.g., #FFFFFF). Optional. |
backgroundColor |
string |
The background color of the notification (e.g., #000000). Optional. |
icon |
string |
A Font Awesome icon name (e.g., fa-solid fa-circle). Optional. |
template |
string |
The notification type: success, error, warning, or info. Determines default styling. Optional. |
sound |
string |
The sound associated with the notification. Uses the same values as template (success, error, warning, info). Optional. |
exports['fnbar-notify']:showNotification({
message = "You have received a new message!",
title = "New Message",
duration = 7000,
mainColor = "#c042ff",
backgroundColor = "#222222",
icon = "fa-solid fa-user",
sound = "success"
})exports['fnbar-notify']:showNotification({
message = "You are in the pvp zone!",
template = "warning"
})