> For the complete documentation index, see [llms.txt](https://docs.codesign.pro/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.codesign.pro/paid-scripts/dispatch3d/developer-api/events.md).

# Events

{% hint style="info" %}

#### **Note**

These events are entirely optional and can be triggered as needed to integrate cd\_dispatch3d with your own scripts or custom systems.
{% endhint %}

***

## Client

{% hint style="success" %}

#### **Client-Side Events**

* Defined with **`RegisterNetEvent`** or **`AddEventHandler`** **in client files**.
* Triggered using **`TriggerEvent`** (if from client) or **`TriggerClientEvent`** (if from server).
* Run only on **one player’s game client** (the player’s PC).
  {% endhint %}

### Panic Button

Activates your panic alert.

{% code title="client-side to client-side" %}

```lua
TriggerEvent('cd_dispatch:PanicButtonEvent')
```

{% endcode %}

{% code title="server-side to client-side" %}

```lua
TriggerClientEvent('cd_dispatch:PanicButtonEvent', source)
```

{% endcode %}

***

### Toggle Quick View UI

Toggles the visibility of the quick view dispatch UI.

{% code title="client-side to client-side" %}

```lua
TriggerEvent('cd_dispatch:KEY_smallui')
```

{% endcode %}

{% code title="server-side to client-side" %}

```lua
TriggerClientEvent('cd_dispatch:KEY_smallui', source)
```

{% endcode %}

***

### Hide Quick View UI

Hides the quick view dispatch UI.

{% code title="client-side to client-side" %}

```lua
TriggerEvent('cd_dispatch:KEY_smallui_hide')
```

{% endcode %}

{% code title="server-side to client-side" %}

```lua
TriggerClientEvent('cd_dispatch:KEY_smallui_hide', source)
```

{% endcode %}

***

### Show Quick View UI

Shows the quick view dispatch UI.

{% code title="client-side to client-side" %}

```lua
TriggerEvent('cd_dispatch:KEY_smallui_show')
```

{% endcode %}

{% code title="server-side to client-side" %}

```lua
TriggerClientEvent('cd_dispatch:KEY_smallui_show', source)
```

{% endcode %}

***

### Open Main Dispatch UI

Opens the main dispatch interface.

{% code title="client-side to client-side" %}

```lua
TriggerEvent('cd_dispatch:KEY_largeui')
```

{% endcode %}

{% code title="server-side to client-side" %}

```lua
TriggerClientEvent('cd_dispatch:KEY_largeui', source)
```

{% endcode %}

***

### Responding

Marks the player as responding to a notification.

{% code title="client-side to client-side" %}

```lua
TriggerEvent('cd_dispatch:KEY_responding')
```

{% endcode %}

{% code title="server-side to client-side" %}

```lua
TriggerClientEvent('cd_dispatch:GpsTrackerDisable', source)
```

{% endcode %}

***

### Disable GPS Tracker

Disables a player’s access to the dispatch system.

{% code title="client-side to client-side" %}

```lua
TriggerEvent('cd_dispatch:GpsTrackerDisable')
```

{% endcode %}

{% code title="server-side to client-side" %}

```lua
TriggerClientEvent('cd_dispatch:GpsTrackerDisable', source)
```

{% endcode %}

***

### Enable GPS Tracker

Restores a player’s access to the dispatch system after being disabled.

{% code title="client-side to client-side" %}

```lua
TriggerEvent('cd_dispatch:GpsTrackerEnable')
```

{% endcode %}

{% code title="server-side to client-side" %}

```lua
TriggerClientEvent('cd_dispatch:GpsTrackerEnable', source)
```

{% endcode %}

***

## Server

{% hint style="success" %}

#### **Server-Side Events**

* Defined with **`RegisterServerEvent`** or **`AddEventHandler`** **in server files**.
* Triggered using **`TriggerEvent`** (if from server) or **`TriggerServerEvent`** (if from client).
* Run on the **server**, not on any individual player’s game client.
  {% endhint %}

### Radio Channel Event

Used to update a player’s radio channel on the dispatch system.\
This event should be triggered from your **radio resource** whenever a player **joins, leaves, or changes** a radio channel.

{% code title="@parameters" %}

```lua
--- @param radioChannel string or number The player’s current radio channel.
--- @example
--- local radioChannel = 1
--- TriggerServerEvent('cd_dispatch:GetRadioChannel', radioChannel)
```

{% endcode %}

{% code title="client-side to server-side" %}

```lua
TriggerServerEvent('cd_dispatch:GetRadioChannel', radioChannel)
```

{% endcode %}

{% code title="server-side to server-side" %}

```lua
TriggerEvent('cd_dispatch:GetRadioChannel', radioChannel, source)
```

{% endcode %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.codesign.pro/paid-scripts/dispatch3d/developer-api/events.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
