Bodycam: Installation
Get the Axon style bodycam and dashcam system running on your server in a few minutes.
Before you start
Make sure OneSync is enabled and your server artifact is up to date. The script detects your framework, inventory, target and notification resource on its own.
Requirements
| Resource | Required | Notes |
|---|---|---|
| ox_lib | Yes | The only hard dependency |
| qbx_core / qb-core / es_extended | Yes | One of them, picked automatically |
| ox_inventory / qb-inventory / ps-inventory | Optional | Falls back to the framework inventory when none is running |
| ox_target / qb-target | Optional | Without one, no terminals are created |
| ox_lib / okokNotify / ps-ui | Optional | Notifications, see Notifications in the config |
codem-inventory, core_inventory, jpr-inventory, origen_inventory and tgiann-inventory are supported for item checks too.
Writing a device serial onto the item needs ox_inventory or qb-inventory; elsewhere the serial is derived from the
character (see the FAQ).
See Dependencies for download links and the start order.
Setup
Download the resource
Get the latest version from portal.cfx.re. See Download your purchase.
Keep the folder name
The folder must be named hype-bodycam. If it starts under another name, the script shuts itself down and
prints a warning to the console. Every export is called through this name as well.
Add the item
Apply only one of these, depending on your inventory. The item name must match Item in the config
(default: bodycam). The item image is in INSTALL/item-images/bodycam.png.
Add the contents of INSTALL/ox-inventory.lua to ox_inventory/data/items.lua. Item use reaches the script through
client.export.
['bodycam'] = {
label = 'Axon Body 3',
weight = 250,
stack = false,
close = true,
description = 'Police body-worn camera. Use it to start or stop recording.',
client = {
export = 'hype-bodycam.bodycam',
},
},Copy the image to ox_inventory/web/images/bodycam.png.
Start the resource
Add it to server.cfg after ox_lib, your framework, inventory and target.
ensure ox_lib
ensure qbx_core # or qb-core / es_extended
ensure ox_inventory # or qb-inventory
ensure ox_target # or qb-target
# HypeScripts
ensure hype-bodycamSet the basics
Open config/config.lua and check at least Item, Access.groups, ViewAccess.groups and Terminals.
See Configuration for every option.
Start order matters
If hype-bodycam starts before your framework, the console prints No supported framework found and nothing works.
Verify
Set Debug = true in the config and start the server. Look for these lines in the console:
[DEBUG:SERVER] [INFO] framework bridge: qbx_core
[DEBUG:SERVER] [INFO] inventory module bound to ox_inventoryJoin an allowed job, go on duty, give yourself the item and use it. The Axon indicator appears on screen and the start beep plays.
Get in a dashcam vehicle (default: the Emergency class). A second feed starts for the vehicle.
Go to a terminal (default: the Mission Row PD computer) and watch the feed. When everything works, set
Debug = false again.
How it works
- Bodycam: on duty officers carrying the item switch the camera on and off by using it.
- Dashcam: when a recording officer gets in a dashcam vehicle, the vehicle starts its own feed with a front and a cabin camera.
- Axon Signal: drawing a firearm or switching on a dashcam vehicle's lights starts recording automatically for on duty officers carrying the item.
- Viewing: allowed players watch live feeds from terminals, a command or your own menu through the
Openexport.
Viewer controls
| Key | Action |
|---|---|
E / → | Next feed |
Q / ← | Previous feed |
TAB | Switch between front and cabin camera |
BACKSPACE | Back to the feed list |
ESC | Close the viewer |
C | Copy the dashcam offset (Debug only) |