ZSX Development
  • Homepage to Innovation
  • User Interface V2
    • Installation
      • Introduce
      • Integration for Chat
      • ZSX_Multicharacter Integration
      • Auto Installer
        • About
        • Overextended Library
    • Exports
      • Interfaces
        • Default Notifications
        • Help Notification
        • Notifications
        • Progress Bar
        • TextUI
          • Updating text & key
        • Point
        • Chat
          • AddMessage
          • AddUserMessage
        • 3D DUI
      • Storage
        • Gathering Storage
          • Get Color
          • Get Type
          • Get Options
          • Is Configuration Done
        • Get Current Screen
        • Is UI Busy
        • Gathering position of the interface
      • Threads
        • Interrupting Thread
      • Other
        • DisplayRadar
        • OpenConfiguration
        • OpenMainMenu
        • OpenSettings
        • IsPauseMenuActive
        • IsUIBusy
        • GetCurrentScreen
        • Cinematic
    • Configurating
      • Handling UI
        • Show / Hide UI
        • Disabling Interfaces
        • Disabling Interfaces type
        • Disabling configuration for Interface
        • Creating new status for HUD
        • Changing links
        • Custom Pause Menu Navbar
        • Removing Pause Menu user data
        • Adjusting new voice states
        • Changing between voice indicators
        • Adding new blacklisted weapon
        • Adding blacklist for vehicle model
        • Changing currency
      • Commands
        • Adding commands
      • Translating
        • Translating the resource
        • Adding translation to custom weapons
        • Translating component's type label
      • Handling Data
        • Adding more accounts to Displayers
        • Adding addon elements to Displayers
        • Creating job2 functionality
        • Changing default keybinds
      • AIO Options
      • Camera stuff
        • Creating new preset for Cinematic Mode
        • Creating new scenes for Main Menu
    • Snippets
      • ESX
        • Notification
        • TextUI
        • ShowAdvancedNotification
        • ShowHelpNotification
      • QBCore
        • Notification
        • ProgressBar
  • Multicharacter
    • Installation
      • Setting up the Appearance
      • Setting up the logo
      • Setting up table removal
    • Exports
      • Client
        • GetConfigValue
        • GetUserStorage
        • Logout
        • SetLocationsDisabled
        • isInMulticharacter
        • Initialize
      • Server
        • isInMulticharacter
        • Logout
    • Workers
    • Baseevents
    • FAQ
    • Translating the resource
    • Open source files
    • Common Issues
      • Common
      • ESX
      • Database
      • Other
  • User Interface
    • About
    • Notifications
    • Progressbar
    • Custom Initialization
    • Functions
  • Dealership
    • About
    • Installation
    • Adding a Store
    • Using Exclusive Content
    • Listeners
    • Configuration
Powered by GitBook
On this page
  • Add
  • Header object
  • Remove
  • Progress
  1. User Interface V2
  2. Exports
  3. Interfaces

Default Notifications

The notification system is designed to display messages that pop up above the minimap, ensuring they are noticeable and non-intrusive during gameplay.

Add

In order to add default notification you can use the export:

local serial = exports['ZSX_UIV2']:DefaultNotification(data)

Data is an object that contains:

-- Example with header
local data = {
    header = 'fas fa-envelope',
    text = 'My default notification'
}
-- Example without header
local data = {
    text = 'My default notification'
}

local data = {
    header = {
            text = 'RESPECT',
            color = "#ee1c3e",
            icon = 'fas fa-chevron-down'
    },
    text = 'Your respect is low!'
}

-- Example with header as image (url)
local data = {
    header = 'https://r2.fivemanage.com/9fHGnEBEfnR89IeQ0njaD/Vector4.png',
    text = 'My default notification with image!'
}
Key
Value
Optional

header

String / Object Icon of the default notification.

text

String Text of the default notification.

progress

persistent

Boolean Sets default notification as persistent. You need to remove it later manually!

Header object

key
value
Optional

text

String Text before the icon

color

HEX Hex color of the icon

icon

The export returns a serial, which can be useful if you need to remove it later.

Remove

To remove a notification before its time elapses, you need to retrieve the serial from the previously added notification. Use this serial to identify and remove the notification.

exports['ZSX_UIV2']:DefaultNotification_Remove(serial)

Progress

To create default notification as progress, you can use the following example:

local data = {
    header = 'Engine',
    progress = { value = 10 },
}
PreviousInterfacesNextHelp Notification

Last updated 3 months ago

Object Creates progress instead of text. Check example .

Icon Icon of the header object. List of .

below
icons