Wasabi Scripts
StoreDiscordGitHub
  • Documentation
  • Dependency
    • 🔗wasabi_bridge
      • Dependencies
      • Installation
      • Configuration
      • Custom Notifications
      • Common Issues & Fixes
  • Advanced Series
    • 🚑wasabi_ambulance
      • Dependencies
      • Installation
      • Configuration
      • Death Screens
      • Exports / Events
      • State Bags
      • Customizations
      • Common Issues
        • QBCore
    • 🩺wasabi_crutch
      • Dependencies
      • Installation
      • Configuration
      • Exports
    • 👮‍♂️wasabi_police
      • Dependencies
      • Installation
      • Configuration
      • Exports
      • State Bags
      • Events
      • Customizations
    • 🔎wasabi_evidence
      • Dependencies
      • Installation
      • Configuration
      • Customizations
    • 🛡️wasabi_adminmenu
      • Dependencies
      • Installation
      • Configuration
    • 👷wasabi_multijob
      • Dependencies
      • Installation
      • Configuration
      • Replace ESX Boss Menus
    • 🔑wasabi_carlock
      • Dependencies
      • Installation
      • Configuration
      • Exports
      • Common Issues
        • QBCore
  • Core UI Series
    • 🖥️wasabi_loadingscreen
      • Configuration
    • 🧑‍🤝‍🧑wasabi_multichar
      • Dependencies
      • Installation
      • Configuration
      • Exports
      • Events
    • 💳wasabi_banking
      • Dependencies
      • Installation
      • Configuration
      • Exports
    • 👼wasabi_spawn
      • Dependencies
      • Installation
      • Configuration
      • Exports
      • Events
    • 🔔wasabi_notify
      • Exports / Events
      • Configuration
      • Change Framework Notify
    • ⏸️wasabi_pausemenu
      • Dependencies
      • Installation
      • Configuration
      • Exports
  • Heist Series
    • 🏦wasabi_pacificrobbery
      • Dependencies
      • Installation
      • Configuration
      • Events
    • 🏦wasabi_paletorobbery
      • Dependencies
      • Installation
      • Configuration
      • Events
    • 🏦wasabi_fleecarobberies
      • Dependencies
      • Installation
      • Configuration
      • Events
  • 💎wasabi_vangelicorobbery
    • Dependencies
    • Installation
    • Configuration
    • Events
  • 🔫wasabi_ammunationrobbery
    • Dependencies
    • Installation
    • Configuration
    • Events
  • 🚢wasabi_yachtheist
    • Dependencies
    • Installation
    • Configuration
    • Events
  • Free Releases
    • 👕fivem-appearance
      • Installation
      • Dependencies
      • Common Issues
      • Snippets
      • Exports
      • Examples
    • 👩‍💻wasabi_discord
      • Installation
      • Exports
Powered by GitBook
On this page
  • Client-Side
  • Server-Side
  1. Core UI Series
  2. wasabi_notify

Exports / Events

Available exports and events for wasabi_notify!

NOTE: You must have resource named wasabi_notify for exports to function properly.

Client-Side

exports.wasabi_notify:notify

exports.wasabi_notify:notify(title, message, time, type, sound, icon, id)

Explanation of parameters:

  • title ? > Optional; String; The title is the header of the notification.

  • message ? > Optional; String; The message contents of the notification.

  • time > Number; The amount of time in miliseconds to display notification. (1000 = one second)

  • type > String; The type of notification to display. Defined types are within 'config.lua`. > Default options: 'info', 'success', 'error', and 'warning'.

  • sound ? > Optional; Bool (true/false); Enable notification sound.

  • icon ? > Optional; String; Define fontawesome icon or false/nil. > If not defined, will use the 'type' icon that is defined in 'config.lua'.

  • id ? > Optional; String or Number; Define an identifier for the specific notification to keep it persistent and update pre-existing notification. (Useful for keeping notifications from becoming spammy)

Example of usage:

RegisterCommand('playNotification', function()
    exports.wasabi_notify:notify('Info', 'This is an \'info\' notification!', 5000, 'info')
    Wait(1000)
    exports.wasabi_notify:notify('Success', 'This is a \'success\' notification!', 5000, 'success')
    Wait(1000)
    exports.wasabi_notify:notify('Error', 'This is an \'error\' notification!', 5000, 'error')
    Wait(1000)
    exports.wasabi_notify:notify('Warning', 'This is a \'warning\' notification!', 5000, 'warning')
end, false)

exports.wasabi_notify:advancedNotify

exports.wasabi_notify:advancedNotify(data)

Explanation of data parameters:

  • title ? > Optional; String; The title is the header of the notification.

  • message ? > Optional; String; The message contents of the notification.

  • id ? > Optional; String or Number; Assign the specific notification an ID to make it persistent and update if passed again.

  • time > Number; The amount of time in miliseconds to display notification. (1000 = one second)

  • type > String; The type of notification to display. Defined types are within 'config.lua`. > Default options: 'info', 'success', 'error', and 'warning'. > If set to 'custom' then will use details from customType

  • customType ? > Optional; Table; { color = '#COLORHEX', color2 =? '#COLORHEX' } > Can use color, hex, etc. If leave color2 as false, will be one color. Otherwise provides gradient.

  • position ? > Optional; String; options; 'center', 'top-right', 'top-left', 'right', 'left', 'bottom-right', and 'bottom-left'. Leave false to use the position defined in 'config.lua'.

  • sound ? > Optional; Bool (true/false); Enable notification sound.

  • icon ? > Optional; String; Define fontawesome icon or false/nil. > If not defined, will use the 'type' icon that is defined in 'config.lua'.

  • iconSize ? > Optional; String; Define the icon size, or leave false/nil and will use iconSize from the 'config.lua'

  • iconEffect ? > Optional; String; Options are 'pulse' and 'fade'

  • color ? > Optional; String; font color, leave false to use default from 'config.lua'.

  • backgroundColor ? > Optional; Example: 'rgba(80, 80, 80, 0.521)'. If not defined, will use default option from 'config.lua'

Example of usage:

RegisterCommand('testNotification', function()

    exports.wasabi_notify:advancedNotify({
        customType = {
            color = '#03fcd7',
            color2 = '#c603fc'
        },
        icon = 'heart',
        iconEffect = 'pulse',
        heading = 'Custom Notification',
        content = 'This is a custom notification!',
        time = 5000
    })
    
end, false)

TriggerEvent('wasabi_notify:notify', title, message, time, type, sound, icon, id)

TriggerEvent('wasabi_notify:notify', title, message, time, type, sound, icon, id)

Explanation of parameters:

  • title ? > Optional; String; The title is the header of the notification.

  • message ? > Optional; String; The message contents of the notification.

  • time > Number; The amount of time in miliseconds to display notification. (1000 = one second)

  • type > String; The type of notification to display. Defined types are within 'config.lua`. > Default options: 'info', 'success', 'error', and 'warning'.

  • sound ? > Optional; Bool (true/false); Enable notification sound.

  • icon ? > Optional; String; Define fontawesome icon or false/nil. > If not defined, will use the 'type' icon that is defined in 'config.lua'.

  • id ? > Optional; String or Number; Define an identifier for the specific notification to keep it persistent and update pre-existing notification. (Useful for keeping notifications from becoming spammy)

Example of usage:

RegisterCommand('playNotification', function()
    TriggerEvent('wasabi_notify:notify', 'Info', 'This is an \'info\' notification!', 5000, 'info')
    Wait(1000)
    TriggerEvent('wasabi_notify:notify', 'Success', 'This is a \'success\' notification!', 5000, 'success')
    Wait(1000)
    TriggerEvent('wasabi_notify:notify', 'Error', 'This is an \'error\' notification!', 5000, 'error')
    Wait(1000)
    TriggerEvent('wasabi_notify:notify', 'Warning', 'This is a \'warning\' notification!', 5000, 'warning')
end, false)

Server-Side

TriggerClientEvent('wasabi_notify:notify', source, title, message, time, type, sound, icon, id)

TriggerClientEvent('wasabi_notify:notify', source, title, message, time, type, sound, icon, id)

Explanation of parameters:

  • source > Number; The player source you wish to play notification

  • title ? > Optional; String; The title is the header of the notification.

  • message ? > Optional; String; The message contents of the notification.

  • time > Number; The amount of time in miliseconds to display notification. (1000 = one second)

  • type > String; The type of notification to display. Defined types are within 'config.lua`. > Default options: 'info', 'success', 'error', and 'warning'.

  • sound ? > Optional; Bool (true/false); Enable notification sound.

  • icon ? > Optional; String; Define fontawesome icon or false/nil. > If not defined, will use the 'type' icon that is defined in 'config.lua'.

  • id ? > Optional; String or Number; Define an identifier for the specific notification to keep it persistent and update pre-existing notification. (Useful for keeping notifications from becoming spammy)

Example of usage:

RegisterCommand('playNotification', function(source)
    TriggerClientEvent('wasabi_notify:notify', source, 'Info', 'This is an \'info\' notification!', 5000, 'info')
    Wait(1000)
    TriggerClientEvent('wasabi_notify:notify', source, 'Success', 'This is a \'success\' notification!', 5000, 'success')
    Wait(1000)
    TriggerClientEvent('wasabi_notify:notify', source, 'Error', 'This is an \'error\' notification!', 5000, 'error')
    Wait(1000)
    TriggerClientEvent('wasabi_notify:notify', source, 'Warning', 'This is a \'warning\' notification!', 5000, 'warning')
end, false)

Previouswasabi_notifyNextConfiguration

Last updated 12 months ago

🔔