Converting Notifications
To Envi-Hud
Replacing all ox_lib notifications with Envi-Hud
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
Last updated