> 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/developer-guide/client-exports.md).

# Client Exports

Raising calls from a client script, and driving the window from another resource.

| Export                     | Notes                                                                                                  |
| -------------------------- | ------------------------------------------------------------------------------------------------------ |
| `CreateCall(data)`         | Raises a call, filling coordinates, street and area from the player's ped when omitted. Returns `true` |
| `CreateDispatchCall(data)` | Identical alias, kept for older scripts                                                                |
| `ToggleWindow()`           | Same as pressing the window key                                                                        |
| `IsResponding()`           | The call id this player is on, or `nil`                                                                |
| `OpenHudEditor()`          | Same as `/dispatchhud`                                                                                 |

### Raising a call where the player is standing

```lua
exports['mango_dispatch']:CreateCall({
    code = '10-31',
    title = 'Shots Fired',
    tags = { 'weapon' },
})
```

The street and area are resolved with the game's own street and zone lookups on the caller's machine, so labels match what the player sees on their own minimap. Pass `street` or `suburb` explicitly to override either.

{% hint style="warning" %}
Client-side calls are rate limited per player (`clientCall.cooldownSeconds`, default 5) and a call inside that window is dropped **silently** - no error, no notification. If a script needs a guaranteed call, raise it on the server.
{% endhint %}

### Driving the UI

```lua
if exports['mango_dispatch']:IsResponding() then
    -- they are on a call; maybe show it in your own HUD
else
    exports['mango_dispatch']:ToggleWindow()
end
```

Useful for a phone app or a settings menu that wants to offer dispatch without reimplementing any of it.

### What is deliberately not exposed

There is no client export to respond, cancel or Code 4. Those all go through the server, which checks the player is a unit before touching the board - so a client cannot put itself on a call it should not see. Drive them from the server with `Respond`, `CancelResponse`, `TakePrimary` and `Code4`.
