Skip to main content

CadIsPlayerLinked

Checks if a specific CAD API ID exists by sending a request to the API and executing a callback with the result.

GetPluginConfig

Provides access to a specific plugin’s configuration using the plugin name.

GetUnitByPlayerId

Retrieves the unit information associated with a player based on their identifiers.

GetUnitCache

Returns the global UnitCache table containing unit data.
For in-game integrations, GetUnitCache is the preferred way to read active CAD unit data from another server resource. It reads SonoranCADFiveM’s local real-time cache, so it is not limited by the public v2 API request limit and can be called repeatedly by your resource. If you are building an external service outside of FiveM, use the v2 Get Active Units API endpoint instead. Each cached unit payload now includes unit.data.communityUserId when the CAD account was linked through the v2 community link flow. That gives third-party resources a stable way to map a CAD unit or push event back to an in-game player without relying on legacy API IDs. To understand where that value comes from, see Map Players to CAD Users and the FiveM resource’s LINKING_V2.md. Typical pattern:

registerEndpoints

Registers API endpoints for use with the sonorancad resource.
None

addBlip

Adds a new blip to the map using the SonoranCAD integration.

addBlips

Adds multiple blips to the map using the SonoranCAD integration.

removeBlip

Removes one or more blips from the map using the SonoranCAD integration.

modifyBlipd

Modifies an existing blip’s data on the map using the SonoranCAD integration.

getBlips

Fetches the list of all active blips from the SonoranCAD system.

removeWithSubtype

Removes all blips of a specific subtype from the map using the SonoranCAD system.

call911

The call911 function facilitates the creation of a 911 emergency call within the SonoranCAD system by sending a structured API request.

addTempBlipData

Temporarily modifies a blip’s data in the SonoranCAD system and then reverts it back to its original data after a specified duration.

addTempBlipColor

Temporarily changes a blip’s color in the SonoranCAD system and reverts it to its original color after a specified duration.

remove911

Removes an active 911 call from the SonoranCAD system.

addCallNote

Adds a note to an existing 911 call in the SonoranCAD system.

setCallPostal

Updates the postal code of an existing 911 call in the SonoranCAD system.

performLookup

Performs a lookup in the SonoranCAD system for information associated with a license plate.

createDispatchCall

Creates a dispatch call in SonoranCAD using the v2 dispatch request format.
The data table supports the same fields as the Create Dispatch Call v2 endpoint. origin, status, priority, and title are required. Include at least one of communityUserIds, accounts, roblox, or discord. To create an unassigned call, pass an empty communityUserIds or accounts array.metaData must contain flat string key/value pairs. Coordinates belong directly under metaData as x, y, and z; do not pass a nested coords table.

cadNameLookup

Perform a name lookup in CAD (Requires “Lookups” submodule to be enabled)
This function will not work if you do not have the “Lookups” submodule enabled. The submodule is enabled by default.

cadPlateLookup

Perform a plate lookup in CAD (Requires “Lookups” submodule to be enabled)
This function will not work if you do not have the “Lookups” submodule enabled. The submodule is enabled by default.

cadGetPlateInformation

Retrieve parsed registration, vehicle, owner, BOLO, and warrant data for a single plate while reusing the shared plate-information cache. This is the same lookup path used by the WraithV2 integration.
This function requires the lookups submodule to be enabled. Results are cached by normalized plate number for 60 seconds by default unless you override or bypass the cache in the options table.

getAllWarrantsAndBolos

Retrieve all active and inactive warrants and bolos with pagination support