Server Functions
This page will explain all exported functions from the SonoranCAD Core that can be used on the server side
CadIsPlayerLinked
exports.sonorancad.CadIsPlayerLinked(apiId, callback)Parameter
Type
Description
-- Example: Checking if a CAD API ID exists
local function onApiIdCheck(exists)
if exists then
print("API ID exists!")
else
print("API ID does not exist.")
end
end
exports.sonorancad.CadIsPlayerLinked("123456", onApiIdCheck) -- Output depends on API response
exports.sonorancad.CadIsPlayerLinked("", onApiIdCheck) -- Output: "API ID does not exist."GetPluginConfig
exports.sonorancad.GetPluginConfig(submoduleName)Parameter
Type
Description
Type
Description
-- Example: Retrieving a plugin's configuration
local pluginConfig = exports.sonorancad.GetPluginConfig("callcommands")
if pluginConfig then
print("Plugin Config:", json.encode(pluginConfig))
else
print("Plugin not found or no configuration available.")
endGetUnitByPlayerId
exports.sonorancad.GetUnitByPlayerId(player)Parameter
Type
Description
Type
Description
-- Example: Getting the unit associated with a player
local unit = GetUnitByPlayerId(1)
if unit then
print("Unit found:", json.encode(unit))
else
print("No unit associated with this player.")
endGetUnitCache
Type
Description
registerEndpoints
addBlip
Parameter
Type
Description
addBlips
Parameter
Type
Description
removeBlip
Parameter
Type
Description
modifyBlipd
Parameter
Type
Description
getBlips
Parameter
Type
Description
removeWithSubtype
Parameter
Type
Description
call911
Parameter
Type
Description
addTempBlipData
Parameter
Type
Description
addTempBlipColor
Parameter
Type
Description
remove911
Parameter
Type
Description
addCallNote
Parameter
Type
Description
setCallPostal
Parameter
Type
Description
performLookup
Parameter
Type
Description
createDispatchCall
Parameter
Type
Description
cadNameLookup
Parameter
Type
Description
cadPlateLookup
Parameter
Type
Description
getAllWarrantsAndBolos
Parameter
Type
Description
Last updated
Was this helpful?

