> 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/qbox-integration.md).

# Qbox Integration

Qbox uses separate client-side and server-side notification functions.

1. Open: qbx\_core/client/functions.lua
2. Find the following code:

```
function Notify(text, notifyType, duration, subTitle, notifyPosition, notifyStyle, notifyIcon, notifyIconColor)
```

3. Replace the entire function with:

```
function Notify(
    text,
    notifyType,
    duration,
    subTitle,
    notifyPosition,
    notifyStyle,
    notifyIcon,
    notifyIconColor
)
    local notification = {
        type = notifyType or 'inform',
        duration = duration or 5000,
        position = notifyPosition,
        style = notifyStyle,
        icon = notifyIcon,
        iconColor = notifyIconColor
    }

    if type(text) == 'table' then
        notification.title =
            text.title
            or text.text
            or text.caption
            or subTitle

        notification.description =
            text.description
            or text.caption
            or text.message
            or text.text
            or 'Notification'

        notification.type =
            text.type
            or notification.type

        notification.duration =
            text.duration
            or notification.duration

        notification.id = text.id
        notification.priority = text.priority
        notification.dismissible = text.dismissible
        notification.showDuration = text.showDuration
        notification.silent = text.silent
        notification.forceSound = text.forceSound
        notification.forceVisible = text.forceVisible
        notification.category = text.category

        notification.icon =
            text.icon
            or notification.icon

        notification.iconColor =
            text.iconColor
            or notification.iconColor
    elseif subTitle then
        notification.title = tostring(text)
        notification.description = tostring(subTitle)
    else
        notification.description = tostring(text)
    end

    if notification.type == 'primary'
        or notification.type == 'info'
        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
```

4. Open: qbx\_core/server/functions.lua
5. Find the following code:

```
function Notify(source, text, notifyType, duration, subTitle, notifyPosition, notifyStyle, notifyIcon, notifyIconColor)
```

6. Replace the entire function with:

```
function Notify(
    source,
    text,
    notifyType,
    duration,
    subTitle,
    notifyPosition,
    notifyStyle,
    notifyIcon,
    notifyIconColor
)
    local notification = {
        type = notifyType or 'inform',
        duration = duration or 5000,
        position = notifyPosition,
        style = notifyStyle,
        icon = notifyIcon,
        iconColor = notifyIconColor
    }

    if type(text) == 'table' then
        notification.title =
            text.title
            or text.text
            or text.caption
            or subTitle

        notification.description =
            text.description
            or text.caption
            or text.message
            or text.text
            or 'Notification'

        notification.type =
            text.type
            or notification.type

        notification.duration =
            text.duration
            or notification.duration

        notification.id = text.id
        notification.priority = text.priority
        notification.dismissible = text.dismissible
        notification.showDuration = text.showDuration
        notification.silent = text.silent
        notification.forceSound = text.forceSound
        notification.forceVisible = text.forceVisible
        notification.category = text.category

        notification.icon =
            text.icon
            or notification.icon

        notification.iconColor =
            text.iconColor
            or notification.iconColor
    elseif subTitle then
        notification.title = tostring(text)
        notification.description = tostring(subTitle)
    else
        notification.description = tostring(text)
    end

    if notification.type == 'primary'
        or notification.type == 'info'
        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']:NotifyPlayer(
            source,
            notification
        )
    end
    return true
end
```
