# Qbox

qbx\_core/server/functions.lua  \[Search **function Notify**]&#x20;

#### Light Theme 👇

{% code title="qbx\_core/server/functions.lua" overflow="wrap" lineNumbers="true" fullWidth="false" expandable="true" %}

```lua
---@see client.lua:Notify.Show
function Notify(source, text, notifyType, duration, subTitle, notifyPosition, notifyStyle, notifyIcon, notifyIconColor)
    local title, message

    -- Normalize text input
    if type(text) == 'table' then
        title = text.text or 'Notification'
        message = text.caption or ''
    elseif subTitle then
        title = text
        message = subTitle
    else
        title = 'Notification'
        message = text
    end

    -- Build nm1-compatible payload
    local data = {
        title = title,
        message = message,
        type = notifyType or 'info',
        duration = duration or 5000,
        theme = notifyStyle or 'dark'
    }

    -- Optional position override
    if notifyPosition then
        data.position = notifyPosition
    end

    TriggerClientEvent('nm1_notification:client:show', source, data)
end

exports('Notify', Notify)
```

{% endcode %}

#### Dark Theme 👇

{% code title="qbx\_core/server/functions.lua" overflow="wrap" lineNumbers="true" fullWidth="false" expandable="true" %}

```lua
---@see client.lua:Notify.Show
function Notify(source, text, notifyType, duration, subTitle, notifyPosition, notifyStyle, notifyIcon, notifyIconColor)
    local title, message

    -- Normalize text input
    if type(text) == 'table' then
        title = text.text or 'Notification'
        message = text.caption or ''
    elseif subTitle then
        title = text
        message = subTitle
    else
        title = 'Notification'
        message = text
    end

    -- Build nm1-compatible payload
    local data = {
        title = title,
        message = message,
        type = notifyType or 'info',
        duration = duration or 5000,
        theme = notifyStyle or 'dark'
    }

    -- Optional position override
    if notifyPosition then
        data.position = notifyPosition
    end

    TriggerClientEvent('nm1_notification:client:show', source, data)
end

exports('Notify', Notify)
```

{% endcode %}
