BodycamNewFree

Bodycam: Configuration

Every option in config/config.lua, from access rules and terminals to dashcams, Axon Signal and beeps.

v1.0.0Open sourceFreeQBox · QBCore · ESX

Tip

After editing, restart only the resource with ensure hype-bodycam; a full server restart is not needed.

All options live in config/config.lua. The file returns one table; the sections below follow its order.

General

config/config.lua
Debug = false,
Item = "bodycam",
Notifications = "auto",
Command = false,

Prop

Type

Device serials

Serials follow the Axon format: X + 8 digits, e.g. X60312274.

Prop

Type

Access

Access decides who may turn a bodycam on, ViewAccess who may watch feeds. groups maps a job name to the minimum grade level.

config/config.lua
Access = {
    groups = { police = 0, bcso = 0 },
    requireDuty = true,
},

ViewAccess = {
    groups = { police = 0, bcso = 0 },
    requireDuty = true,
    ace = "group.admin",
},

Prop

Type

Terminals

Viewing points created with ox_target or qb-target. Walking away from the terminal closes the viewer. The defaults match the hype-camera computers, so a single PC offers both options.

config/config.lua
Terminals = {
    { coords = vec3(441.85, -978.92, 30.69), radius = 0.8, label = "Mission Row PD" },
    { coords = vec3(1853.18, 3689.62, 34.27), radius = 0.8, label = "Sandy Shores Sheriff" },
    { coords = vec3(-448.29, 6011.95, 31.72), radius = 0.8, label = "Paleto Bay Sheriff" },
},
TerminalDistance = 3.0,

Prop

Type

Bodycam

Camera attached to the officer's ped.

Prop

Type

Dashcam

Vehicle camera. It starts when a recording officer gets in a matching vehicle.

config/config.lua
Dashcam = {
    classes = { [18] = true },          -- 18 = Emergency
    models = { `fbi`, `fbi2` },         -- always get one, whatever their class
    excluded = { `ambulance`, `firetruk`, `lguard` },
    -- ...
    vehicles = {
        [`police3`] = vec3(0.0, 0.25, 0.62), -- per-model camera position
    },
},

Prop

Type

Finding the right offset

With Debug = true, watch a dashcam feed and press C. The current camera offset is copied to your clipboard, ready to paste into Dashcam.vehicles.

Viewer

Prop

Type

Beeps

Real Axon audio: a double beep on start, a single beep on stop and a periodic reminder while recording. Nearby players hear them too, attenuated by distance.

Prop

Type

Axon Signal

Triggers that start recording automatically for on duty officers carrying the item.

Prop

Type

UI

Prop

Type

Locales

The language comes from ox_lib, so it is set in server.cfg rather than in the config:

server.cfg
setr ox:locale "en"

en and tr are included. To add a language, copy locales/en.json, translate it, save it with the language code as its name (e.g. de.json) and set ox:locale to that code.

config.lua
en.json
tr.json
fxmanifest.lua

On this page