Unit Status

Allows you to change a unit's status in the CAD.

Activation Guide

1. Download and Install the Resource

This submodule is already enabled by default when installing the Sonoran CAD FiveM resource.

2. Adjust the Configuration

The bodycam settings are stored inside of the /configuration/unitstatus_config.lua file.

unitstatus_config.lua
Option
Description
Default

setStatusCommand

Command that will allow units to set their own status.

setstatus

statusCodes

Array of status codes, configurable to be community-specific

Default SonoranCAD setup

3. Ensure Players are Linked

Ensure the player has already linked their CAD for this integration to work.

4. Setup User Permissions

This script provides a status set command by default. Players will need the command.setstatus ACE permission (or whatever you configure the command to be).

Example

add_ace builtin.everyone command.setstatus allow

This line in your config.cfg file will allow everyone to access the command. We highly reccomend creating proper ace permission groups to prevent users from spamming.

Commands

In-game commands can be used to

  • /setstatus [status] Set your unit status in the CAD.

Function

This is a server-side function only and is exported as cadSetUnitStatus. Use setUnitStatus if using with other submodules.

  • apiId: The identifier attached to the unit

  • status: A status, can be the actual string or a number, based on configuration

  • player (optional): server ID of the player, used to send a client event

Event

Last updated

Was this helpful?