๐Ÿ“Snippets

Change the ox_lib notifications to Origen Notify:

  1. Find the notify.lua file in ox_lib/resource/interface/client/notify.lua

  2. Find this function function lib.notify (...) and change it for this:

function lib.notify(data)
    local text = data.description or data.title or ''
    local notifyType = data.type or 'info'
    local duration = data.duration or 3000
    
    exports["origen_notify"]:ShowNotification(text, notifyType, duration)
end
  1. Enjoy!! ๐Ÿ˜„

Change the ox_lib TextUI for Origen Notify HelpNotify

  1. Find the textui.lua file in ox_lib/resource/interface/client/textui.lua

  2. Find this function function lib.showTextUI(...) and change it for this:

function lib.showTextUI(text, options)
    if currentText then return end
    
    options = options or {}
    local key = options.key or 'E'
    
    currentText = exports["origen_notify"]:CreateHelp(key, text)
    isOpen = true
end
  1. In the same file find this function to function lib.hideTextUI() and change it for this:

function lib.hideTextUI()
    if not currentText then return end
    
    exports["origen_notify"]:RemoveHelp(currentText)
    currentText = nil
    isOpen = false
end
  1. Enjoy!! ๐Ÿ˜„

Last updated