Picture of the authoredeverce

Bodycam & Dashcam

A bodycam and dashcam script for FiveM, providing immersive video and recording features for law enforcement roleplay.

Installation

Download the Script

Download Bodycam & Dashcam (ed_bodycamdashcam) using the Cfx Portal.

Download the Dependencies

Download the latest ox_lib GitHub.

Server.cfg Configuration

Add the following lines to your server.cfg to ensure the required resources are loaded:

server.cfg
ensure ox_lib
ensure ed_bodycamdashcam

Make sure ox_lib is started before ed_bodycamdashcam.

Configuration

Ace Permission Setup

Available Ace Permissions

PermissionDescription
DashcamSetupAllows user to set up dashcam positions using the in-game setup command (/dashcamsetup).
BodycamDashcam(Standalone only) Allows user to use bodycam & dashcam features when framework is set to standalone.

Example Usage

server.cfg
add_ace group.admin "DashcamSetup" allow
add_ace group.police "BodycamDashcam" allow # Only needed for standalone mode

Inventory Integration

ox_inventory

If you are using the ox_inventory inventory, you must include the export table within the item data for the bodycam item.

Example:

ox_inventory/data/items.lua
['bodycam'] = {
  label = 'Bodycam',
  weight = 0.1,
  consume = 0,
  server = {
    export = 'ed_bodycamdashcam.bodycam'
  }
},

This is required for the item to function properly with ox_inventory.

Bodycam Configuration

The bodycam script is highly configurable via the ClientConfig.Bodycam section. Below are the key options and their explanations:

PropTypeDefault
ToggleBodycamCommand
string
bodycam
RecordBodycamCommand
string
recordbodycam
RecordBodycamKey
string
X
ItemName?
string
-
BodycamProp
object
-
RecordingBodycamProp
object
-
NoBodycamProp
object
-
Recording?
object
-
ViewingLocations
array
-

Recording Service: Only Fivemanage is supported for uploading bodycam footage. Discord Webhooks are not supported. Fivemanage offers a free tier with 30 GB of storage.

Recording Time Limit: The maximum recording duration can be configured in Recording.RecordingLimit (default: 300 seconds).

Note:

  • If you are using a framework (not standalone), set the correct job names in AllowedJobs to restrict bodycam usage to specific roles (e.g., police).
  • If you set ClientConfig.Framework to standalone, the script will ignore AllowedJobs and instead require the ace permission BodycamDashcam (name is configurable).

Dashcam Configuration

The dashcam script is configurable via the ClientConfig.Dashcam section. Below are the key options and their explanations:

PropTypeDefault
SetupCommand
string
dashcamsetup
DefaultCamera
object
-
Controls
object
-

Usage

Bodycam

  • Toggle the bodycam overlay using the /bodycam command.
  • Start recording by pressing the X or using the /recordbodycam command.
  • The bodycam must be equipped and allowed for your job.
  • Recording uploads footage to Fivemanage, which offers a free tier with 30 GB of storage.

Dashcam

  • Use the /dashcamsetup command in-game to set up dashcam positions for vehicles. This command requires the DashcamSetup ace permission.

Viewing Dashcam

Drivers and passengers can press C to switch to their vehicle's dashcam view, if the vehicle is registered with a dashcam. See the next step for instructions on registering a dashcam.

Registering a Vehicle Dashcam

To integrate a dashcam into a vehicle, use the following export in your script:

Register Vehicle Dashcam
exports['ed_bodycamdashcam']:registerVehicleDashcam(netId, {
    jobName = player.PlayerData.job
})

Make sure to replace player.PlayerData.job with your framework's player job name.

PropTypeDefault
netId
number
-
jobName
string
-

Guides

Troubleshooting

  • Ensure ox_lib is installed and started before ed_bodycamdashcam. Click here
  • Make sure you have the correct ace permissions for dashcam setup. Click here