🛠️Setup
This is a detailed setup guide for Bodycam & Dashcam. If you have any questions before making a purchase, you can contact us on Discord
Installation
Download & Extract: Place the script in your
resourcesfolder.Add to Server CFG: Add
ensure cs_bodycamto yourserver.cfg.Configure Settings: Modify
config.luaas needed.Add Inventory Items
(Only QB & ESX):Ox Inventory: Add the following to
ox_inventory/data/items.lua:['bodycam'] = { label = 'Radio', weight = 500, stack = false, description = 'A portable body camera used by law enforcement.' client = { event = 'cs:bodycam:useBodyCam', remove = function(total) if total < 1 then TriggerEvent('cs:bodycam:forceStop') end end } } ['dashcam'] = { label = 'Dash Cam', weight = 500, stack = false, description = 'A vehicle-mounted dashcam used for recording footage.' client = { event = 'cs:bodycam:useDashCam', } },QB Inventory: Add the following to
qb-core/shared/items.lua:["bodycam"] = { name = "bodycam", label = "Body Cam", weight = 500, type = "item", image = "bodycam.png", unique = true, description = "A portable body camera used by law enforcement." }, ["dashcam"] = { name = "dashcam", label = "Dash Cam", weight = 500, type = "item", image = "dashcam.png", unique = true, description = "A vehicle-mounted dashcam used for recording footage." },ESX Inventory: Run the following SQL query in your database:
INSERT INTO `items` (`name`, `label`, `weight`, `rare`, `can_remove`) VALUES ('bodycam', 'Body Cam', 1, 0, 1), ('dashcam', 'Dash Cam', 1, 0, 1);
Configuration
Modify the config.lua file to customize the script:
General Framework Settings
Dashboard Panel & Groups
Using Standalone Mode
If you are running a standalone server (not using QBCore or ESX), you need to define user permissions manually using Steam, Ace Permissions, Discord IDs, or Role IDs. Here’s how to configure it:
DashBoard_Access: Replace
'put_perms_here'with Steam HEX, Ace Group, Discord ID, or Role ID.Title: Department name.
Logo: Path to department logo.
Location: If set, players must stand at this position to access the dashboard. Set to
falseif not required.
BodyCam Settings
DashCam Settings
Recording Settings
Enable: Turns the recording feature on or off.
Fivemanage: If using FiveManage API, set this to
true.Fivemerr: If using FiveMerr API, set this to
true.RecordFPS: Determines the frame rate of the recorded video.
RecordMic: If
true, records microphone audio with the video.RecordMicKey : Push-to-Talk key to record audio while recording.
Max_Recording_Time: The maximum duration (in seconds) for a single recording clip.
Note: The recording API or discord webhook settings can be configured in
sv_function.luaUse FiveManage or FiveMerr for longer video sizes due to the Discord webhook limit
Enabling Automatic Recording When Using BodyCam (Item)
Modify and replace existing code incs_bodycam\config\functions\sv_function.lua at line 90 with the below code to automatically start recording when a bodycam is used:
This ensures the recording automatically starts when a player uses the bodycam item.
Adding a Keybind for Recording
To allow players to start recording by pressing Y (configurable), add the following code to cs_bodycam\config\functions\cl_function.lua:
This binds the Y key to toggle recording, providing a convenient way for players to start and stop recording manually.
How to Use
Access Dashboard: Stand at the designated location (if set) and open the panel.
Use BodyCam: Run
/bodycam(if enabled) or activate via inventory.Use DashCam: Run
/dashcamin a valid vehicle.Use Recording: Run
/recordingto open the record panel.
Last updated