> 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/free-resources/mango-notify/developer-guide/events.md).

# Events

Client and server events — every operation, under both the notify:\* and mango\_notify:\* prefixes.

Every event is registered under **two names**: the short `notify:*` prefix and the resource-scoped `mango_notify:*` prefix. They behave identically — use whichever your codebase prefers.

## Client events

Trigger from any **client** script:

```lua
TriggerEvent('notify:show', data)
TriggerEvent('notify:success', title, description, duration)
TriggerEvent('notify:error', title, description, duration)
TriggerEvent('notify:warning', title, description, duration)
TriggerEvent('notify:info', title, description, duration)
TriggerEvent('notify:dispatch', data)
TriggerEvent('notify:money', amount, direction, extra)   -- direction: 'received' | 'removed'
TriggerEvent('notify:update', id, data)
TriggerEvent('notify:remove', id)
TriggerEvent('notify:clear')
```

The typed events accept a data table in place of the title argument, exactly like the exports.

## Server events

Trigger from any **server** script — first argument is the target player id (`-1` = everyone):

```lua
TriggerEvent('notify:server:show', playerId, data)
TriggerEvent('notify:server:success', playerId, title, description, duration)
TriggerEvent('notify:server:error', playerId, title, description, duration)
TriggerEvent('notify:server:warning', playerId, title, description, duration)
TriggerEvent('notify:server:info', playerId, title, description, duration)
TriggerEvent('notify:server:dispatch', playerId, data)
TriggerEvent('notify:server:money', playerId, amount, direction, extra)
TriggerEvent('notify:server:update', playerId, id, data)
TriggerEvent('notify:server:remove', playerId, id)
TriggerEvent('notify:server:clear', playerId)
```

{% hint style="success" %}
**Security by design:** the `notify:server:*` events are registered server-locally (`AddEventHandler`, not `RegisterNetEvent`). A modified client can **never** trigger them over the network to spam notifications to other players. They are only reachable from server-side code via `TriggerEvent`.
{% endhint %}

## Server → client

You can also target the client events directly from the server with `TriggerClientEvent`:

```lua
TriggerClientEvent('notify:success', playerId, 'Deposit complete', 'Funds are in your account.')
```

This is exactly what the server exports and `notify:server:*` events do under the hood.
