Configuration
In the configuration file (config.lua), you can easily customize the notification script to fit your needs, allowing you to adjust the style and appearance of notifications to your preferences.
Notification Type
Lets use this notification type as example:
success = {
color = '#28a745', -- You can find a hex color at: https://www.color-hex.com/
icon = 'fa-solid fa-check-circle' -- You can find a fontawesome code at: https://fontawesome.com/ , make sure to only copy the "fa-solid ...." part and remove the others.
},
The color is a hex color. You can find the hex from any color here: https://www.color-hex.com/
The icon is the icon which you can see at the left from a notification. You can either use fontawesome or add a custom icon yourself.
Custom Icon
Adding a custom icon is quite easy. Lets say you want to add your own logo as a icon, and you name it 'logo.png'. In this case, you have to transfer the logo.png file to /nui/img/ inside of the notify folder. If you have done that, then you will make your own type:
custom = {
color = '#FFFFFF', -- You can find a hex color at: https://www.color-hex.com/
icon = 'logo.png' -- The icon's file name
},
That's it. Easy, isn't it?
Position
You can use a few different position's, you can't add new one's, only one of these:
top-right -> This will show the notification at the top right of the screen.
top-left -> This will show the notification at the top left of the screen.
bottom-right -> This will show the notification at the bottom right of the screen.
bottom-left -> This will show the notification at the top left of the screen.
center-right -> This will show the notification at the right center of the screen.
center-left -> This will show the notification at the left center of the screen.
Last updated