# 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:

```lua
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
```

3. Enjoy!! :smile:

## 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:

```lua
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
```

3. In the same file **find** this function to `function lib.hideTextUI()` and change it for this:

```lua
function lib.hideTextUI()
    if not currentText then return end
    
    exports["origen_notify"]:RemoveHelp(currentText)
    currentText = nil
    isOpen = false
end
```

4. Enjoy!! :smile:
