The 911 Call API endpoint allows you to send 911 calls from in-game directly to your dispatchers.
This API endpoint requires the standard version of Sonoran CAD or higher. For more information, see our pricing page.
This framework export handles the .
This method utilizes the plugin to execute a 911 call.
"/rcall is not drawing a postal route to the call location
If you are using the Raw API Call method, please ensure that you have useCallLocation set to true.
On either version of the call, please ensure that the postal is a valid, integer value
Boolean
Should the postal location be drawn when using the /rcall command
postal
Integer
Postal location of the call
plate
String
OPTIONAL: Plate to report in the call
cb
Function
OPTIONAL: Callback function
Please ensure that you have the dispatchnotify plugin installed
Please ensure the unit is on duty with the configured method in dispatchnotify
Please ensure your server's port and IP are correctly set in the Admin -> In-game Integration -> Livemap section of CAD
caller
String
Name of the caller
location
String
Street(s) name
description
String
Call description
useCallLocation
function call911(caller, location, description, postal, plate, cb)
exports["sonorancad"]:performApiRequest({{
["serverId"] = GetConvar("sonoran_serverId", 1),
["isEmergency"] = true,
["caller"] = caller,
["location"] = location,
["description"] = description,
["metaData"] = {
["useCallLocation"] = true,
["plate"] = plate,
["postal"] = postal
}
}}, "CALL_911", cb)
end-- Parameters
emergency, caller, location, description, source, silenceAlert, useCallLocation type
-- Usage example (client sided)
local pos = GetEntityCoords(PlayerPedId())
local s1, s2 = GetStreetNameAtCoord(pos.x, pos.y, pos.z)
local street1 = GetStreetNameFromHashKey(s1)
local street2 = GetStreetNameFromHashKey(s2)
local streetLabel = street1
if street2 ~= nil then
streetLabel = streetLabel .. ' ' .. street2
end
TriggerServerEvent('SonoranCAD::callcommands:SendCallApi', true, 'Bystander', streetLabel, 'Someone is selling drugs on the street', GetPlayerServerId(PlayerId()), nil, nil, '911')These endpoints allow you to create, update, and close dispatch and emergency (911) calls.
This endpoint allows you to easily update the postal on a dispatch call.
This API endpoint requires the plus version of Sonoran CAD or higher. For more information, see our pricing page.
This framework export handles the Set Call Postal API endpoint.
function setCallPostal(callId, postal)
exports["sonorancad"]:performApiRequest({{
["serverId"] = GetConvar("sonoran_serverId", 1),
["callId"] = callId,
["postal"] = postal
}}, "SET_CALL_POSTAL", function(_)
end)
endcallId
Integer
Call ID to add the note to
postal
Integer
Postal to add to the call
This endpoint allows you to add a new dispatch call note.
This API endpoint requires the plus version of Sonoran CAD or higher. For more information, see our pricing page.
This framework export handles the Add Call Note API endpoint.
function addCallNote(callId, note)
exports["sonorancad"]:performApiRequest({{
["serverId"] = GetConvar("sonoran_serverId", 1),
["callId"] = callId,
["note"] = note
}}, "ADD_CALL_NOTE", function(_)
end)
endCall notes are formatted on dispatch calls with the following object:
callId
Integer
Call ID to add the note to
note
Note Object
See Note Object above
{
"time": "12:00:00",
"label": "A-10",
"type": "text",
"content": "This is a note!"
}This endpoint allows you to remove an existing emergency/911 call from the CAD.
This API endpoint requires the Standard version of Sonoran CAD or higher. For more information, see our pricing page.
This framework export handles the Remove Emergency Call API endpoint.
function remove911(callId)
exports["sonorancad"]:performApiRequest({{
["serverId"] = GetConvar("sonoran_serverId", 1),
["callId"] = callId
}}, "REMOVE_911", function(_)
end)
endcallId
Integer
Call ID to remove