> For the complete documentation index, see [llms.txt](https://mango-5m.gitbook.io/mango5m-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mango-5m.gitbook.io/mango5m-docs/resources/mango-dispatch/getting-started/installation.md).

# Installation

Drop the folder in, ensure it, and set the jobs that receive alerts.

{% stepper %}
{% step %}

### Drop the folder in

Put the `mango_dispatch` folder anywhere inside your `resources/` directory. Keep the folder name exactly `mango_dispatch` - every export, event and NUI callback is namespaced to it.
{% endstep %}

{% step %}

### Ensure it in `server.cfg`

```cfg
ensure mango_dispatch
```

{% hint style="info" %}
If another resource of yours integrates with the dispatch, ensure `mango_dispatch` **before** it, so its exports exist by the time that resource starts.
{% endhint %}
{% endstep %}

{% step %}

### Pick who gets alerts

Open `config/config.lua` and set the jobs that should receive calls:

```lua
Config.Recipients = {
    mode = 'both',
    jobs = { 'police', 'sheriff', 'ambulance' },
    requireOnDuty = false,
}
```

These must be the **job names your framework uses**, not the labels - `police`, not `Police Department`. See [Recipients and Units](/mango5m-docs/resources/mango-dispatch/configuration/recipients-and-units.md) for what `mode` does.
{% endstep %}

{% step %}

### Restart and check the console

```
[mango_dispatch] ready - esx
```

The word after `ready -` is the framework bridge that was detected. If it says `no framework detected`, jump to [Framework and Bridges](/mango5m-docs/resources/mango-dispatch/configuration/framework-and-bridges.md).
{% endstep %}
{% endstepper %}

### Requirements

|              |                                                                                         |
| ------------ | --------------------------------------------------------------------------------------- |
| Framework    | ESX, QBCore or Qbox - auto-detected. Anything else works through a bridge file          |
| Database     | **None.** No SQL to import                                                              |
| Dependencies | None                                                                                    |
| Optional     | `mango_notify` or `ox_lib` for nicer toasts. Without either, the resource draws its own |

### What gets installed

| Path                    | What it is                                                   |
| ----------------------- | ------------------------------------------------------------ |
| `config/config.lua`     | Every gameplay setting                                       |
| `config/bridge.lua`     | Framework and notification provider selection                |
| `bridge/framework/`     | One file per framework - ESX, QBCore, Qbox, custom           |
| `bridge/notifications/` | One file per notification resource, plus a built-in fallback |
| `web/`                  | The NUI - alert cards, call window, HUD editor               |
| `web/sounds/`           | Alert audio. Drop your own `.mp3` files here                 |

`config/`, `bridge/`, `web/css/` and `web/sounds/` are all outside escrow, so you can edit them freely.

### Updating

Replace the folder, then copy your old `config/config.lua` and `config/bridge.lua` values across - or diff the new config against yours and bring over any new keys. There is no database and no migration step. See [Troubleshooting](/mango5m-docs/resources/mango-dispatch/reference/troubleshooting.md) if something stops responding after an update.
