> For the complete documentation index, see [llms.txt](https://tefox-scripts.gitbook.io/tefox-scripts-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://tefox-scripts.gitbook.io/tefox-scripts-docs/tefox-scripts-documentation/tefox_notify/installation.md). Agents can also search and read this documentation through its [MCP server](https://tefox-scripts.gitbook.io/tefox-scripts-docs/~gitbook/mcp).

# Installation

### <mark style="color:$primary;">**Step 1: Add the resource**</mark>

Download the latest version and place the `tefox_notify` folder inside your `resources` folder.

### <mark style="color:$primary;">**Step 2: server.cfg**</mark>

Start `tefox_notify` **after** your database, ox\_lib and framework:

```cfg
ensure oxmysql
ensure ox_lib
ensure qb-core
ensure tefox_notify
```

Replace `qb-core` with `es_extended` or `qbx_core` depending on your framework. Remove `ox_lib` if your server doesn't use it.

### <mark style="color:$danger;">**Step 3: Connect your framework**</mark>

This step makes every notification on your server use TEFOX Notify, including notifications from your other scripts. Follow the section for your framework only.

**QBCore**

Open <mark style="color:yellow;">`qb-core/fxmanifest.lua`</mark> and add this line as the **last entry** of `client_scripts`:

```lua
'@tefox_notify/hooks/qb.lua'
```

Example:

```lua
client_scripts {
    'client/main.lua',
    'client/functions.lua',
    'client/loops.lua',
    'client/events.lua',
    'client/drawtext.lua',
    '@tefox_notify/hooks/qb.lua'
}
```

{% hint style="info" %}
Don't forget the comma after the line before it.
{% endhint %}

**ESX**

Open <mark style="color:yellow;">`es_extended/client/functions.lua`</mark> and find:

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

Add this line **directly under it**:

```lua
    if GetResourceState('tefox_notify') == 'started' then return exports.tefox_notify:Notify({ message = message, type = notifyType, duration = length, title = title }) end
```

Result:

```lua
function ESX.ShowNotification(message, notifyType, length, title, position)
    if GetResourceState('tefox_notify') == 'started' then return exports.tefox_notify:Notify({ message = message, type = notifyType, duration = length, title = title }) end
    ...
end
```

{% hint style="info" %}
If your `ESX.ShowNotification` uses different parameter names (for example `msg` instead of `message`), use your names in the line.
{% endhint %}

**Qbox**

Qbox sends all of its notifications through ox\_lib, so only one line is needed.

Open <mark style="color:yellow;">`ox_lib/resource/interface/client/notify.lua`</mark> and find:

```lua
function lib.notify(data)
```

Add this line **directly under it**:

```lua
    if GetResourceState('tefox_notify') == 'started' then return exports.tefox_notify:Notify(data) end
```

Result:

```lua
function lib.notify(data)
    if GetResourceState('tefox_notify') == 'started' then return exports.tefox_notify:Notify(data) end
    ...
end
```

**Using ox\_lib with QBCore or ESX?**

Complete your framework step above, **and** add the Qbox ox\_lib line too. This covers scripts that use `lib.notify` directly.

### <mark style="color:$primary;">**Step 4: Restart**</mark>

Restart your **whole server**, not only the framework resource.

Join the server and type `/notifysettings` to open the settings menu and make sure everything works.

{% hint style="info" %}
**Uninstalling:** If `tefox_notify` is stopped, your server falls back to its original notifications automatically. If you remove it completely, also remove the line you added in Step 3.
{% endhint %}
