messageClear Notify System

An advanced, customizable notification system for FiveM servers by Code Universe.

1. Introduction

circle-info

It's a free resource, so maybe we will not support it.

Clear Notify is an advanced, customizable notification system for FiveM servers. It provides a sleek, modern interface for displaying notifications with various types, durations, and interactive elements.

2. Installation

  1. Download the latest release from the releases pagearrow-up-right.

  2. Extract the contents into your FiveM resources folder.

  3. Add ensure clear-notify to your server.cfg file.

3. Configuration

Edit the config.lua file to customize the notification system:

Config = {}

Config.Types = {
    SUCCESS = { color = "#00BA88" },
    ERROR = { color = "#FF4B4B" },
    INFO = { color = "#0095FF" },
    WARNING = { color = "#FF8800" }
}

Config.DefaultDuration = 5000
Config.Position = "top-right"
Config.MaxNotifications = 4

4. Basic Usage

To display a notification, use the ShowNotification export:

5. Advanced Usage

You can add an action button to your notification:

To remove a notification programmatically:

6. API Reference

ShowNotification(data)

Displays a new notification.

Parameters:

  • data (table):

  • title (string): The title of the notification.

  • message (string): The main content of the notification.

  • type (string): The type of notification (SUCCESS, ERROR, INFO, WARNING).

  • duration (number): How long the notification should be displayed (in ms).

  • action (string, optional): A unique identifier for the action button.

  • actionLabel (string, optional): The text to display on the action button.

Returns:

  • id (number): A unique identifier for the created notification.

RemoveNotification(id)

Removes a specific notification.

Parameters:

  • id (number): The unique identifier of the notification to remove.

7. Replacing Standard Notifications

QB-Core

Replace the default QB-Core notifications in your qb-core/client/functions.lua:

ESX

Replace the default ESX notifications in your es_extended/client/functions.lua:

8. Troubleshooting

(None)

9. Examples

(Will be soon.)

Support

If you need help or have any questions, please open an issue in the GitHub repository or join our Discord serverarrow-up-right.

Credits

Created with ❤️ by Code Universe

Last updated