> 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/configuration/alerts-and-sound.md).

# Alerts and Sound

How long alert cards stay on screen, and how to use your own alert audio.

```lua
    alertDisplaySeconds = 30,

    alertSound = {
        enabled = true,
        file = 'dispatch-alert.mp3',
        volume = 0.6,
    },
```

| Key                   | Default              | What it does                                                    |
| --------------------- | -------------------- | --------------------------------------------------------------- |
| `alertDisplaySeconds` | `30`                 | How long a card stays on screen before it fades itself out      |
| `alertSound.enabled`  | `true`               | Play the audio file with each alert                             |
| `alertSound.file`     | `dispatch-alert.mp3` | A file inside `web/sounds/`                                     |
| `alertSound.volume`   | `0.6`                | `0.0` to `1.0`. Anything outside that range falls back to `0.6` |

Dismissing a card with `N` removes it immediately; responding with `Y` removes it and opens the window. Letting it time out leaves the call untouched - it is still listed in the quick call window and on the board.

{% hint style="info" %}
A short native GTA UI blip is played alongside the file. It is not configurable; set `alertSound.enabled = false` if you want the custom file gone but keep in mind the native tick remains.
{% endhint %}

### Using your own sound

{% stepper %}
{% step %}

### Drop the file in

Put your `.mp3` in `web/sounds/`. The manifest ships `'web/sounds/**/*'`, so subfolders work too - `web/sounds/tones/priority.mp3`.
{% endstep %}

{% step %}

### Point the config at it

```lua
alertSound = { enabled = true, file = 'priority.mp3', volume = 0.5 },
```

Or, for a subfolder, `file = 'tones/priority.mp3'`.
{% endstep %}

{% step %}

### Restart the resource

Sounds are packaged as NUI files, so a `refresh` plus `restart mango_dispatch` is needed for a brand new file to be served.
{% endstep %}
{% endstepper %}

### A different sound for one call

Any call can override the sound for that alert only:

```lua
exports['mango_dispatch']:CreateCall({
    code = '10-99',
    title = 'Officer Down',
    sound = 'officer-down.mp3',
    x = x, y = y, z = z,
})
```

The name is sanitised before it reaches the UI - anything that is not a letter, digit, dash, dot or underscore is stripped, and it is capped at 60 characters. A file that does not exist simply plays nothing; it never errors.

### Silent calls

```lua
silent = true
```

No card, no sound, on anyone's screen. The call still exists, still appears in the quick call window, and can still be responded to. This is how demo seeding and low-priority logging calls are raised.

### Where the card appears

Top-right by default, stacking downwards, newest on top with a `#1` index. Each player can drag the stack anywhere with `/dispatchhud` - see [Moving the HUD](/mango5m-docs/resources/mango-dispatch/features/moving-the-hud.md). Colours and sizing are in `web/css/style.css`, covered in [Styling the UI](/mango5m-docs/resources/mango-dispatch/reference/styling-the-ui.md).
