# Notify

### client/custom/notify

{% tabs %}
{% tab title="default" %}

```lua
Config.Notify = 'default' -- default, custom
```

```lua
if Config.Notify ~= 'default' then
    return
end

local vRP
if Config.Framework == 'vrp' then
    vRP = Proxy.getInterface('vRP')
end

function Notify(message, type)
    if Config.Framework == 'qb-core' then
        TriggerEvent('QBCore:Notify', message, type)
    elseif Config.Framework == 'qbox' then
        exports['qbx_core']:Notify(message, type)
    elseif Config.Framework == 'esx' then
        TriggerEvent('esx:showNotification', message, type)
    elseif Config.Framework == 'vrp' then
        vRP.notify({ message, type })
    end
end
```

{% endtab %}

{% tab title="custom" %}

```lua
Config.Notify = 'custom' -- default, custom
```

```lua
if Config.Notify ~= 'custom' then
    return
end

---@param message string
---@param type string
function Notify(message, type)
    -- implement your logic here (this is just an example)
    TriggerEvent('chat:addMessage', {
        args = { '[Gang-Activities]', message },
        color = { 255, 255, 255 },
        multiline = true
    })
end
```

{% endtab %}
{% endtabs %}

### server/custom/notify

{% tabs %}
{% tab title="default" %}

```lua
Config.Notify = 'default' -- default, custom
```

```lua
if Config.Notify ~= 'default' then
    return
end

local vRPClient
if Config.Framework == 'vrp' then
    local Tunnel = module('vrp', 'lib/Tunnel')
    vRPClient = Tunnel.getInterface('vRP', 'gang-activities')
end

function Notify(source, message, type)
    if Config.Framework == 'qb-core' then
        TriggerClientEvent('QBCore:Notify', source, message, type)
    elseif Config.Framework == 'qbox' then
        exports['qbx_core']:Notify(source, message, type)
    elseif Config.Framework == 'esx' then
        TriggerClientEvent('esx:showNotification', source, message, type)
    elseif Config.Framework == 'vrp' then
        vRPClient.notify(source, { message, type })
    end
end

```

{% endtab %}

{% tab title="custom" %}

```lua
Config.Notify = 'custom' -- default, custom
```

```lua
if Config.Notify ~= 'custom' then
    return
end

---@param source number
---@param message string
---@param type string
function Notify(source, message, type)
    -- implement your logic here (this is just an example)
    TriggerClientEvent('chat:addMessage', source, {
        args = { '[Gang-Activities]', message },
        color = { 255, 255, 255 },
        multiline = true
    })
end

```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.redutzu.com/resources/gang-activities/guides/notify.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
