# 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 %}
