Skip to content

B2DevUK/B2_NotifyV2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

B2 Notify V2

SUPPORT DISCORD: discord.gg/KZRBA6H5kR

Overview

B2 Notify V2 is a customizable notification system for FiveM, designed to provide an enhanced user interface experience. It supports multiple notification types, positions, and integrates with sounds to alert users effectively.

Features

  • Multiple Notification Types: Success, Error, Warning, and Info notifications.
  • Positioning: Place notifications at the top, middle, or bottom of the screen, with left, right, and center variations.
  • Stacking: Ensures notifications do not overlap each other.
  • Customization: Color-coded notifications with a glowing border and bar on the left.
  • Sound Alerts: Play different sounds for each notification type.
  • Ease of Use: Simple command and export functions for triggering notifications.

Installation

  1. Download and Extract: Download the repository and extract it to your resources folder in your FiveM server directory.

  2. Folder Structure:

    resources/
    └── b2_notifyV2/
        ├── html/
        │   ├── index.html
        │   ├── sounds/
        │   │   ├── success.wav
        │   │   ├── error.wav
        │   │   ├── warning.wav
        │   │   └── info.wav
        ├── client.lua
        └── fxmanifest.lua
    
  3. Add to Server Configuration: Open your server.cfg file and add the following line:

    start b2_notifyV2
    

Usage

Export Function

You can trigger notifications from other scripts using the export function.

Syntax:

exports['b2_notifyV2']:ShowNotification(title, message, duration, type, position)

Example:

exports['b2_notifyV2']:ShowNotification("Test Title", "This is a test message", 5000, "success", "top-right")

Configuration

Notification Types

  • success: Displays a success message with a green highlight.
  • error: Displays an error message with a red highlight.
  • warning: Displays a warning message with a yellow highlight.
  • info: Displays an info message with a blue highlight.

Positions

  • top-left
  • top-right
  • bottom-left
  • bottom-right
  • middle-left
  • middle-right
  • middle-center
  • top-middle
  • bottom-middle

Development

HTML (index.html)

The index.html file contains the Vue.js application & TailwindCSS styling that renders the notifications.

Lua Script (client.lua)

The client.lua script handles the commands and exports to trigger notifications from other resources.

Resource Manifest (fxmanifest.lua)

Defines the resource for FiveM and specifies the files to be used.

Content:

ui_page 'html/index.html'

files {
    'html/index.html',
    'html/sounds/*.wav'
}

client_scripts {
    'client.lua'
}

Contributing

Contributions are welcome! If you have any suggestions or improvements, feel free to create an issue or submit a pull request.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgements

Contact

For any questions, support or to follow our upcoming releases, you can reach out on our SUPPORT DISCORD

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors