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

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

Last updated