# Client Events

### Bodycam Record Toggle

This client event triggers a bodycam recording using a custom trigger name. This event requires the [Body Camera submodule](/cad/integration-plugins/in-game-integration/available-plugins/bodycam.md) to be enabled.

```lua
TriggerEvent('SonoranCAD::bodycam::AutoRecordTrigger', triggerName)
```

{% tabs %}
{% tab title="Parameters" %}

<table><thead><tr><th width="188">Name</th><th width="106">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>triggerName</code></td><td><code>string</code></td><td>A custom label describing what caused the recording to start.</td></tr></tbody></table>
{% endtab %}

{% tab title="Example Usage" %}

```lua
RegisterCommand('bodycamclip', function()
    TriggerEvent('SonoranCAD::bodycam::AutoRecordTrigger', 'manual-clip')
end, false)
```

{% endtab %}
{% endtabs %}

Use this event from your own client-side scripts whenever you want to create a bodycam clip for a specific gameplay action.


---

# Agent Instructions: 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:

```
GET https://docs.sonoransoftware.com/cad/integration-plugins/in-game-integration/framework-development-documentation/client-events.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
