# LGMods AXON Body 4 - Bodycam and Recording System

##

Welcome to the official documentation for the **LGMods AXON Body 4 Bodycam Resource**. This resource provides a realistic, minimalist bodycam overlay for FiveM, inspired by real-world AXON Body 4 devices used by UK and International police forces.

### Installation

Follow these steps to install the resource on your server:

1. **Download & Extract**: Download the resource folder and extract it into your server's `resources` directory. Ensure the folder is named `LG_BWV`.
2. **Configuration**: Open `config.lua` and configure your settings (Webhook URLs, Framework, etc.).
3. **Server Config**: Add the following to your `server.cfg`:

   ```lua
   ensure screencapture
   ensure LG_BWV
   ```
4. **Dependencies**: This resource requires `screencapture` for video and screenshot functionality. Ensure it is installed and started before  `LG_BWV`. You can install screencapture via <https://github.com/itschip/screencapture> installation guide.

{% hint style="info" %}
**ℹ️ Note**\
These instructions assume you have a working FiveM server that you can already connect to.\
For help setting up a FiveM server, see: [FiveM Server Setup Guide](https://docs.fivem.net/docs/server-manual/setting-up-a-server/)
{% endhint %}

### Configuration (`config.lua`)

Since this resource is delivered with encryption (Tebex), the `config.lua` is your primary tool for customization. Below are the key sections you can modify:

#### General & Framework

* `Config.Framework`: Set to `'standalone'`, `'esx'`, or `'qbcore'`.

```lua
Config.ResourceName = 'bodycam'

Config.Debug = false

Config.Framework = 'standalone' -- 'standalone', 'esx', 'qbcore'
```

#### Display Settings

```
Config.Bodycam = {
    model = 'AXON BODY 4',                  -- The exact model name shown in the top-left corner
    forceNumber = '',                       -- Officer / unit force number (e.g. 'PC 1234' or 'Unit A-41'). Leave empty to hide.
    department = 'METROPOLITAN POLICE',     -- Full department name (shown when enabled)
    departmentShort = 'MET',                -- Short/abbreviated version (e.g. 'MET', 'BTP', 'NCA')
    divisionPrefix = 'PC',                  -- Rank/prefix before officer ID (e.g. 'PC', 'SGT', 'DC')
    showOfficerName = true,                 -- Display the player's in-game name / RP name
    showOfficerId = true,                   -- Show officer ID / badge number (usually combined with prefix)
    showDepartment = true,                  -- Show full or short department name
    showDateTime = true,                    -- Show current date and time (real server time)
    showBattery = true,                     -- Display battery icon + percentage
    showGPS = true,                         -- Show live GPS coordinates / street name 
    showSignalStrength = true,              -- Show mobile/cellular signal bars
    showRecordingIndicator = true,          -- Red "REC" dot + pulsing animation when actively recording
    dateFormat = 'YYYY-MM-DD',              -- Date format 
    -- NOTE: Timezone suffix "-0400" is currently fixed in UI (
    timeFormat = '24h',                     -- '24h' or '12h' (12-hour adds AM/PM)
    batteryLevel = 87,                      -- Static battery % for testing/preview (real value can be dynamic)
    signalBars = 4,                         -- Static signal strength (1–5 bars) for preview
    overlayOpacity = 0.85,                  -- Overall transparency of the entire overlay (0.0–1.0)
    scanlineEffect = true,                  -- Classic CRT-style rolling scanlines across the screen
    vignetteEffect = true,                  -- Darkened edges (lens vignette) for realistic camera look
    staticNoiseOnToggle = true,             -- Brief static/interference burst when turning on/off
    recordingPulseAnimation = true,         -- Pulsing red REC indicator when recording is active
    showWatermark = true,                   -- Show bottom watermark text
    watermarkText = 'AXON EVIDENCE.COM',    -- Customizable evidence watermark (or remove by setting showWatermark = false)
    cameraId = 'X81-',                      -- Camera serial/ID prefix (e.g. 'X81-4721')
    firmwareVersion = 'FW 2.1.0.12',        -- Firmware version shown in overlay (adds realism)
}
```

#### Sound Settings&#x20;

The \`Config.Sounds\` table controls the audio feedback players hear when interacting with the bodycam  specifically the activation and deactivation sounds. These subtle but immersive sound effects help sell the realism of turning a professional-grade bodycam on or off, similar to real AXON Body 4 devices.

```
Config.Sounds = {
    enabled          = true,      -- Master toggle: enable/disable all bodycam-related sounds
    activateSound    = true,      -- Play activation beep/chirp when turning bodycam ON
    deactivateSound  = true,      -- Play deactivation tone when turning bodycam OFF
    volume           = 0.5,       -- Global volume level for bodycam sounds (0.0 = silent, 1.0 = full volume)
}
```

####

#### Discord Integration Configuration (`Config.Discord`)

The `Config.Discord` table controls all Discord webhook logging, notifications, screenshots, and video uploads triggered by bodycam events. When enabled, every activation, deactivation, or configured media capture sends a clean, formatted embed to your Discord channel — perfect for dispatch logging, evidence archiving, or supervisor monitoring.

```lua
Config.Discord = {
    enabled = true,                           -- Master toggle: enable/disable ALL Discord logging and media sending
    webhookURL = 'https://discord.com/api/webhooks/...',  -- Main webhook for text logs and embeds
    botName = 'AXON Bodycam System',          -- Name shown for webhook messages
    botAvatar = 'https://.../image.png',      -- Avatar/icon for the bot (URL to a .png/.jpg)
    embedColour = 3066993,                    -- Embed sidebar color (decimal RGB, e.g. 3066993 = #2ECC71 green)
    footerText = 'AXON Evidence | Metropolitan Police',  -- Footer text on every embed
    footerIcon = '',                          -- Small icon next to footer (URL, optional)
    sendOnActivate = true,                    -- Send embed when bodycam is turned ON
    sendOnDeactivate = true,                  -- Send embed when bodycam is turned OFF
    sendScreenshot = true,                    -- Enable screenshot sending (requires screencapture)
    screenshotOnActivate = true,              -- Capture & send screenshot on activation
    screenshotOnDeactivate = false,           -- Capture & send screenshot on deactivation
    screenshotInterval = 0,                   -- Auto-capture every X seconds while active 
    screenshotWebhookURL = '',                -- Separate webhook for screenshots (leave empty to use main webhookURL)
    sendVideo = true,                         -- Enable video clip sending (requires screencapture)
    videoOnActivate = true,                   -- Start & send video clip on activation (duration configurable elsewhere)
    videoOnDeactivate = false,                -- Send final clip when deactivating
    videoWebhookURL = '',                     -- Separate webhook for video files (leave empty to use main webhookURL)
    logPlayerName = true,                     -- Include player's RP/in-game name in logs
    logPlayerId = true,                       -- Include server ID (e.g. #5)
    logPlayerIdentifiers = true,              -- Include steam/fivem/discord identifiers
    logCoordinates = true,                    -- Include exact X,Y,Z coordinates at time of event
    logStreetName = true,                     -- Include nearest street name / zone (if available)
    logTimestamp = true,                      -- Include real server time of event

    mentionRoleOnActivate = false,            -- Ping a role when bodycam activates (e.g. for urgent calls)
    mentionRoleId = '',                       -- Discord role ID to mention (e.g. '123456789012345678')
}
```

### Framework Integration & Permissions (`Config.FrameworkIntegration`)

This section controls **who can use the bodycam** and under what conditions.\
It supports job restrictions, item requirements, duty checks, ACE permissions, and more — making it easy to fit the bodycam into police-only RP, emergency services, or custom setups.

```lua
Config.FrameworkIntegration = {
    -- ITEM REQUIREMENT (QBCore / ESX only)
    requireItem          = false,          -- Must have a bodycam item in inventory to toggle
    itemName             = 'bodycam',      -- Inventory item name (e.g. 'bodycam', 'policebodycam')
    removeItemOnUse      = false,          
    returnItemOnDeactivate = false,        -- Give item back when turning OFF
    useItemToToggle      = true,           -- Use the item to toggle (if requireItem = true)
    registerUsableItem   = true,           -- Auto-register item as usable (/use bodycam)

    -- JOB RESTRICTIONS
    restrictToJobs       = true,           -- Only allow specific jobs to use bodycam
    allowedJobs = {
        ['police']    = { enabled = true, minGrade = 0, label = 'Police' },
        ['ambulance'] = { enabled = true, minGrade = 0, label = 'Ambulance' },
        ['sheriff']   = { enabled = true, minGrade = 0, label = 'Sheriff' },
        ['fbi']       = { enabled = true, minGrade = 0, label = 'FBI' },
        -- Add or remove jobs as needed
        -- Example with grade restriction:
        -- ['police'] = { enabled = true, minGrade = 2, label = 'Police (Sergeant+)' },
    },
    -- DUTY REQUIREMENT (QBCore / ESX)
    restrictToDuty       = false,          -- Must be on duty to use bodycam
    
    -- GANG SUPPORT (QBCore only)
    allowGangs           = false,          -- Allow gang members to use bodycam
    allowedGangs = {
        ['lostmc']    = { enabled = false, minGrade = 0, label = 'Lost MC' },
        ['ballas']    = { enabled = false, minGrade = 0, label = 'Ballas' },
        -- Add gangs here if allowGangs = true
    },

    -- ACE PERMISSIONS (FiveM native)
    restrictToAcePermission = false,       -- Use ACE perms instead of (or with) jobs
    acePermission        = 'bodycam.use',  -- Permission node required (e.g. group.admin)
```

#### Auto-Trigger Events

Lua

```
Config.autoTrigger = {
    weaponDraw   = true,
    takeDamage   = true,
    vehicleEnter = false
    -- etc.
}
```

#### AXON Logo Customization

* Format: .png (transparent background recommended)
* File: html/img/axon\_logo.png
* Recommended: \~45px height (width auto-scales)
* Ideal canvas: 150 × 45 px

#### &#x20;Video Recording Configuration (\`Config.VideoRecording\`)

This section controls the automatic video recording feature of the bodycam. When enabled, the resource captures gameplay footage from the moment the bodycam is activated until it is deactivated, then automatically uploads the clip to Discord (via the configured webhook).

```
Config.VideoRecording = {
    enabled = true,     -- Master toggle: enable/disable video recording entirely
    fps     = 30,       -- Frames per second for the captured video (higher = smoother, but larger files & more CPU)
    quality = 0.6,      -- Video quality/compression level (0.0–1.0)
                        
}
```

### Advanced Settings Configuration (Config.Advanced)

These settings fine-tune bodycam behavior, safety features, performance, and realism — especially useful for preventing abuse, handling edge cases, and optimizing server performance.

```
Config.Advanced = {
    cooldown              = 3,            -- Seconds before player can toggle bodycam again (anti-spam)
    autoDeactivateOnDeath = true,         -- Automatically turn off bodycam when player dies
    autoDeactivateOnDisconnect = true,    -- Turn off bodycam if player disconnects
    persistOnReconnect    = false,        -- Keep bodycam active state after reconnect (if true + autoDeactivateOnDisconnect = false)
    syncWithOtherPlayers  = false,        
    maxRecordingTime      = 40,           -- second
   

    gpsUpdateInterval     = 5,            -- How often GPS coordinates update in overlay (seconds)
    timestampUpdateInterval = 1,          -- How often date/time refreshes (seconds, usually 1 for real-time feel)
}
```

### Commands

| Command                  | Description                                 | Access               |
| ------------------------ | ------------------------------------------- | -------------------- |
| /togglebodycam           | Toggle bodycam on/off (also bound to key B) | Allowed players      |
| /bodycam\_status         | View all active bodycams                    | Server console/admin |
| /bodycam\_forceoff \[id] | Force deactivate a player's bodycam         | Server console/admin |
| /bodycam\_forceon \[id]  | Force activate a player's bodycam           | Server console/admin |
| /bodycam\_monitor        | Live remote view of active unit bodycams    | Force managers       |

### Exports

All exports are **client-side** unless otherwise noted.

Lua

```
exports['bodycam']:IsBodycamActive()      -- Returns boolean
exports['bodycam']:ToggleBodycam()        -- Toggle on/off
exports['bodycam']:ActivateBodycam()      -- Force activate
exports['bodycam']:DeactivateBodycam()    -- Force deactivate
```

Use these in other scripts (e.g. panic button → force activate, dispatch → check status).

### Support

For help with installation, configuration, bugs, or feature requests: Join the **LGMods Discord** server and open a support ticket.

Made with ♥ by LGMods


---

# 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.lgmods.co.uk/scripts/lgmods-axon-body-4-bodycam-and-recording-system.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.
