Envi Scripts Documentation
  • 👋Introduction
  • 🌉Envi-Bridge
  • ⚙️Compatibility
  • 🖨️Licensing
  • 📒Premium Scripts
    • ❔FAQ / COMMON ISSUES
    • ‼️FIRST STEPS (READ FIRST)
    • ⭐Useful Resources
    • 👀Envi FiveM Showcase Server
    • 📸Envi-Camera
      • ❗First Steps
      • Inventory Setup
      • Editable Functionality
      • Complete Lens Kit
      • Printing Photos
      • Ped Reactions
      • Exports
      • Config File
    • 🪚Envi-ChopShop
      • Inventory Setup
      • How to Chop
      • Props for AntiCheats
      • Editable Functionality
      • Config File
    • 🪣Envi-Dumpsters
      • Common Issues
      • Inventory Setup
      • Editable Functionality
      • Exports
      • Exclusive Zones
      • Survival Items
      • Shopping Carts
      • Hobo Bowling
      • Hobo Taxi
      • Rats and Racoons
      • Config File
      • V2 Config
    • 💺Envi-Ejector-Seats
      • Inventory Setup
      • How to Eject
      • Editable Functionality
      • Config File
    • 🔥Envi-Flamethrower (Standalone)
      • Common Issues
      • Inventory Setup
      • Refueling
      • Editable Functionality
      • Config File
    • 🪽Envi-Flight-Suits
      • Inventory Setup
      • Flight Suits
      • Config File
    • 🍜Envi-Food-Truck
      • ❗VooDoo Required
      • Common Issues
      • Inventory Setup
      • Adding Additional Grill Items
      • Unique Shops with Liveries
      • Spawning the Trucks
      • Using the Trucks
      • Exports
      • Config File
    • 💍Envi-Forever-Rings
      • Inventory Setup
      • Editable Functionality
      • Ring Shop MLO
      • Config File
    • 💻Envi-Hack-Minigames (Standalone)
      • The Worm
      • Password
      • Firewall
      • Node Runner
      • Config File
    • 🎞️Envi-HUD
      • ❗First Time Setup
      • Common Issues
      • Inventory Setup
      • Adding Custom Weapons
      • Change Logo
      • Custom Fonts
      • Converting Notifications
      • Converting Progress Bars
      • Editable Functionality
      • Settings Save Location
      • Exports and Events
      • Commands
      • Vehicle Control
      • Anti Muscle Spasm
      • Ragdoll
      • Config File
    • 🎇Envi-Items
      • Inventory Setup
      • Config File
    • 🚑Envi-Medic
      • Common Issues
      • Fully Disable Transport to Hospital
      • Failsafe
      • Ambulance Scripts
      • Vehicle Fuel
      • Vehicle Keys
      • Exports
      • Config File
    • ☄️Envi-MethVan
      • Common Issues
      • Inventory Setup
      • Cooking Process
      • Editable Functionality
      • Adding a Vehicle
      • Config File
    • 🍃Envi-Megablower9000 (Standalone)
      • Inventory Setup
      • Config File
    • 👯Envi-Population (Standalone)
      • ❗Initial Setup
      • Common Issues
      • Config File
    • 🗒️Envi-Prescriptions
      • Common Issues
      • Inventory Setup
      • Editable Functionality
      • Config File
    • 🔧Envi-Sabotage
      • ❗First Time Setup
      • Common Issues
      • Inventory Setup
      • Exports
    • 🛒Envi-Shops
      • Common Issues
      • Inventory Setup
      • Exports
      • Editable Functionality
      • Config File
    • 📱Envi-Trap-Phone
      • Common Issues
      • Inventory Setup
      • Commands
      • Exports
      • Adding Custom Drugs
      • Using the Phone
      • Disabling Extra Services
      • Config Files
        • config.lua
        • dialogueSettings.lua
        • extraServices.lua
        • gangZoneSettings.lua
        • personalitySettings.lua
        • specialContactSettings.lua
    • 👰Envi-Weddings
      • Inventory Setup
      • Starting Info
      • Manually Removing Data
      • Commands
      • Config File
    • 🎅Envi Xmas-Weapons (Standalone)
      • Inventory Setup
      • Config File
    • 🗡️Envi-Zombie-Weapons (Standalone)
      • Inventory Setup
    • 🧟‍♂️Envi-Zombies
Powered by GitBook
On this page
  • To Envi-Hud
  • Away from Envi-Hud
  1. Premium Scripts
  2. Envi-HUD

Converting Notifications

To Envi-Hud

Replacing all ox_lib notifications with Envi-Hud

  1. Navigate to ox_lib/resource/interface/client/notify.lua

  2. Find the lib.notify function

  3. Replace the entire function with the following:

  4. function lib.notify(data)
        local sound = settings.notification_audio and data.sound
        data.sound = nil
        data.position = data.position or settings.notification_position
    
        if data.type == 'inform' then
            data.type = 'info'
        end
    
        exports['envi-hud']:Notify({
            type = data.type,
            message = data.description,
            title = data.title,
            duration = data.duration
        })
    
        if not sound then return end
    
        if sound.bank then lib.requestAudioBank(sound.bank) end
    
        local soundId = GetSoundId()
        PlaySoundFrontend(soundId, sound.name, sound.set, true)
        ReleaseSoundId(soundId)
    
        if sound.bank then ReleaseNamedScriptAudioBank(sound.bank) end
    end

Replacing all ESX notifications with Envi-Hud

  1. Navigate to es_extended/client/functions.lua

  2. Find the ESX.ShowNotification function

  3. Replace the entire function with the following:

  4. function ESX.ShowNotification(message, type, length)
        exports['envi-hud']:Notify({
            type = type,
            message = message,
            title = '',
            duration = length or 5000
        })
    end

Replacing all Qbox notifications with Envi-Hud

  1. Navigate to qbx_core/client/functions.lua

  2. Find the Notify function

  3. Replace the entire function with the following:

  4. function Notify(text, notifyType, duration, subTitle, notifyPosition, notifyStyle, notifyIcon, notifyIconColor)
        local title, description
        if type(text) == 'table' then
            title = text.title or text.text or ''
            description = text.message or text.description or text.caption or ''
            notifyType = text.type or notifyType
            duration = text.duration or duration
        elseif subTitle then
            title = text
            description = subTitle
        else
            description = text
        end
    
        exports['envi-hud']:Notify({
            type = notifyType or 'info',
            message = description,
            title = title or '',
            duration = duration or 5000
        })
    end
  5. Navigate to qbx_core/server/functions.lua

  6. Find the Notify function

  7. Replace the entire function with the following:

  8. function Notify(source, text, notifyType, duration, subTitle, notifyPosition, notifyStyle, notifyIcon, notifyIconColor)
        local title, description
        if type(text) == 'table' then
            title = text.text or 'Placeholder'
            description = text.caption or nil
        elseif subTitle then
            title = text
            description = subTitle
        else
            description = text
        end
        local position = notifyPosition or positionConfig
    
        TriggerClientEvent('envi-hud:notify', source, {
            title = title,
            message = description,
            duration = duration,
            type = notifyType,
        })
    end

Replacing QB Core Notifications with Envi-Hud

  1. Navigate to qb-core/client/functions.lua

  2. Find the QBCore.Functions.Notify function

  3. Replace the entire thing with the following

  4. function QBCore.Functions.Notify(text, texttype, length, icon)
        if texttype == 'primary' then texttype = 'info' end
        exports['envi-hud']:Notify({
            type = texttype or 'info',
            message = type(text) == 'table' and text.text or text,
            title = type(text) == 'table' and text.caption or nil,
            duration = length or 5000,
            icon = icon
        })
    end

Away from Envi-Hud

  1. Navigate to envi-hud/client/client_open.lua

  2. Find the Notify function

  3. Replace the code in this function with whatever notification script you would like to use

    1. There are too many notification scripts to add all of them to these docs, so you'll need to check the documentation for the notification script you're going to be using

PreviousCustom FontsNextConverting Progress Bars

Last updated 23 days ago

📒
🎞️