> For the complete documentation index, see [llms.txt](https://nexeum.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://nexeum.gitbook.io/docs/nex-duty/events.md).

# Events

## Send Unit On Duty

<mark style="color:orange;">`Client to Server`</mark> `nex-duty:server:go_on_duty`

<table><thead><tr><th width="216.27276611328125">Argument</th><th width="139.7274169921875">Type</th><th width="300">Description</th><th>Example</th></tr></thead><tbody><tr><td><code>entity_id</code></td><td>string</td><td>The entity identifier the player will be going on duty as</td><td><code>"lspd"</code></td></tr><tr><td><code>callsign [optional]</code></td><td>string</td><td>An optional callsign value for the </td><td><code>"1S-57"</code> or <code>null</code></td></tr><tr><td><code>loadout</code></td><td>integer</td><td>Whether the loadout for the entity should be applied to the player.</td><td><code>1</code> or <code>0</code></td></tr><tr><td><code>bodycam</code></td><td>integer</td><td>Whether the bodycam interface should be shown whilst on duty.</td><td><code>1</code> or <code>0</code></td></tr></tbody></table>

{% tabs %}
{% tab title="Client Side" %}

```lua
TriggerServerEvent("nex-duty:server:go_on_duty", "lspd", "1S-57", 0, 0)
```

{% endtab %}
{% endtabs %}

## Send Off / Suspend a Unit

<mark style="color:orange;">`Client to Server`</mark> `nex-duty:server:execute_user_action`

<table><thead><tr><th width="145.3636474609375">Argument</th><th width="139.7274169921875">Type</th><th width="300.45458984375">Description</th><th>Example</th></tr></thead><tbody><tr><td><code>user</code></td><td>integer</td><td>The source of the player you intend to execute an action on.</td><td><code>12</code></td></tr><tr><td><code>action</code></td><td>string</td><td><code>suspend</code> or <code>offduty</code></td><td><code>suspend</code> or <code>offduty</code></td></tr><tr><td><code>data</code></td><td>object</td><td>The optional data for the function, length is required for a suspension, and is processed as an integer in hours.</td><td><pre><code>{
    "reason": "Reckless Engagement",
    "length": 12
}
</code></pre></td></tr><tr><td><code>entity</code></td><td>string</td><td>The entity identifier of the unit</td><td><code>lspd</code></td></tr></tbody></table>

{% tabs %}
{% tab title="Suspend \[Client Side]" %}
{% code overflow="wrap" %}

```lua
TriggerServerEvent("nex-duty:server:execute_user_action", 12, "suspend", { "reason": "Reckless Endangerment", "length": 12 }, "lspd")
```

{% endcode %}
{% endtab %}

{% tab title="Send Off \[Client Side]" %}
{% code overflow="wrap" %}

```lua
TriggerServerEvent("nex-duty:server:execute_user_action", 12, "offduty", { "reason": "Reckless Endangerment" }, "lspd")
```

{% endcode %}
{% endtab %}
{% endtabs %}


---

# 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://nexeum.gitbook.io/docs/nex-duty/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.
