> For the complete documentation index, see [llms.txt](https://risenova-scripts.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://risenova-scripts.gitbook.io/docs/risenova-notifications/esx-integration.md).

# ESX Integration

This integration redirects the normal ESX notification function to RiseNova Notification.

1. Open: es\_extended/client/functions.lua
2. Find the following code:

```
function ESX.ShowNotification(message, notifyType, length, title, position)
```

3. Replace the entire function with:

```
function ESX.ShowNotification(
    message,
    notifyType,
    length,
    title,
    position
)
    local notification = {
        title = title,
        description = tostring(message),
        type = notifyType or 'inform',
        duration = length or 5000,
        position = position
    }

    if notification.type == 'info'
        or notification.type == 'primary'
        or notification.type == 'default'
    then
        notification.type = 'inform'
    elseif notification.type == 'danger' then
        notification.type = 'error'
    elseif notification.type == 'warn' then
        notification.type = 'warning'
    end

    if GetResourceState('RiseNova_Notification') == 'started' then
        return exports['RiseNova_Notification']:Notify(notification)
    end
end
```
