# Bodycam

## Adding the bodycam item to your inventory

To add the bodycam item to your inventory, follow the steps for your specific inventory system:

#### ox\_inventory (@ox\_inventory/data/items.lua)

```lua
['bodycam'] = {
    label = 'Bodycam',
    weight = 300,
    stack = false,
    close = true,
    allowArmed = true,
    consume = 0,
    client = { event = 'redutzu-mdt:client:toggle-bodycam-state', image = 'bodycam.png' },
    description = 'Let other players see your body with the most advanced bodycam on FiveM'
}
```

#### qb-inventory (@qb-core/shared/items.lua)

```lua
bodycam = {
    name = 'bodycam',
    label = 'Bodycam',
    weight = 300,
    type = 'item',
    image = 'bodycam.png',
    unique = true,
    useable = true,
    shouldClose = true,
    combinable = nil,
    description = 'Let other players see your body with the most advanced bodycam on FiveM'
}
```

#### qs-inventory (@qs-inventory/shared/items.lua)

```lua
['bodycam'] = {
    ['name'] = 'bodycam',
    ['label'] = 'Bodycam',
    ['weight'] = 300,
    ['type'] = 'item',
    ['image'] = 'bodycam.png',
    ['unique'] = true,
    ['useable'] = true,
    ['shouldClose'] = true,
    ['combinable'] = nil,
    ['description'] = 'Let other players see your body with the most advanced bodycam on FiveM'
}
```

## Modifying Bodycam Functionality

The functionality of the bodycam can be modified in the `server/custom/bodycam/default.lua` file. This file contains the default implementation of the bodycam feature, and you can customize it to fit your needs.

The image of the bodycam item is located in the same directory as the `default.lua` file.

## Server-Side Export

There is also a server-side export to check if a player has the bodycam enabled:

```lua
exports['redutzu-mdt']:isBodycamEnabled(source)
```

To toggle the bodycam, the player must have the bodycam item in their inventory and use it. The UI will appear, indicating that the bodycam is enabled, and any officer can then view the player's real-time footage.


---

# 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.redutzu.com/resources/redutzu-mdt/guides/bodycam.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.
