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:
ensure ox_lib
ensure ed_bodycamdashcamMake sure ox_lib is started before ed_bodycamdashcam.
Configuration
Ace Permission Setup
Available Ace Permissions
| Permission | Description |
|---|---|
DashcamSetup | Allows 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
add_ace group.admin "DashcamSetup" allow
add_ace group.police "BodycamDashcam" allow # Only needed for standalone modeInventory 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:
['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:
| Prop | Type | Default |
|---|---|---|
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
AllowedJobsto restrict bodycam usage to specific roles (e.g., police). - If you set
ClientConfig.Frameworktostandalone, the script will ignoreAllowedJobsand instead require the ace permissionBodycamDashcam(name is configurable).
Dashcam Configuration
The dashcam script is configurable via the ClientConfig.Dashcam section. Below are the key options and their explanations:
| Prop | Type | Default |
|---|---|---|
SetupCommand | string | dashcamsetup |
DefaultCamera | object | - |
Controls | object | - |
Usage
Bodycam
- Toggle the bodycam overlay using the
/bodycamcommand. - Start recording by pressing the X or using the
/recordbodycamcommand. - 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
/dashcamsetupcommand in-game to set up dashcam positions for vehicles. This command requires theDashcamSetupace 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:
exports['ed_bodycamdashcam']:registerVehicleDashcam(netId, {
jobName = player.PlayerData.job
})Make sure to replace player.PlayerData.job with your framework's player job name.
| Prop | Type | Default |
|---|---|---|
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
Theming
Add colors. Make it yours.
Five Emergency
Five Emergency is an advanced online police simulation for FiveM that offers a fully immersive law enforcement experience. Players take on the role of police officers and interact with a wide range of in-game systems designed to simulate real-life police duties.