Browse docs
Server Exports
Dispatch
Create a dispatch for the MDT Tablet.
exports["sky_jobs_base"]:createDispatch(
"Suspicious activity", -- title
"Caller reports suspicious behavior near Legion Square.", -- description
GetEntityCoords(PlayerPedId()), -- coords (vector3)
{ "police", "sheriff" } -- jobs
)
exports["sky_jobs_base"]:createDispatch(
"Suspicious activity", -- title
"Caller reports suspicious behavior near Legion Square.", -- description
vector3(215.9, -810.2, 30.7), -- coords (vector3)
{ "police", "sheriff" } -- jobs
)
Restraints
cuffPlayer(sourceId, targetId, cuffType?, options?)
- Purpose: Applies cuffs or zipties to a target player from another resource.
- Arguments:
sourceId(number): The server ID of the acting player.targetId(number): The server ID of the target player.cuffType(string?):"cuffs"(default) or"zipties".options(table?):ignoreItemCheck(boolean?) — skip the restraint item requirement and consumption.allowSelf(boolean?) — allowsourceId == targetId.
- Returns:
boolean, string?—trueon success, otherwisefalseand a reason key.
local success, reason = exports["sky_policejob"]:cuffPlayer(sourceId, targetId, "cuffs", {
ignoreItemCheck = false,
allowSelf = false
})
uncuffPlayer(sourceId, targetId, options?)
- Purpose: Removes cuffs or zipties from a target player.
- Returns:
boolean, string?.
local success, reason = exports["sky_policejob"]:uncuffPlayer(sourceId, targetId)
cutZipties(sourceId, targetId, options?)
- Purpose: Cuts zipties from a target player (the civilian ziptie-cutter flow).
- Returns:
boolean, string?.
local success, reason = exports["sky_policejob"]:cutZipties(sourceId, targetId)
isPlayerCuffed(targetId)
- Purpose: Reports whether the target player is currently restrained.
- Returns:
boolean.
local cuffed = exports["sky_policejob"]:isPlayerCuffed(targetId)
useHeadBag(sourceId, targetId, action?, options?)
- Purpose: Uses or removes a head bag on a target player. Non-police sources automatically run through the
Config.CivilianUse.headBagrules. - Arguments:
action(string?):"toggle"(default),"apply", or"remove".
- Returns:
boolean, string?.
local success, reason = exports["sky_policejob"]:useHeadBag(sourceId, targetId, "toggle")
isPlayerHeadBagged(targetId)
- Purpose: Reports whether the target player currently has a head bag applied.
- Returns:
boolean.
local isHeadBagged = exports["sky_policejob"]:isPlayerHeadBagged(targetId)
Escort
escortToggle(sourceId, targetId)
- Purpose: Starts or stops escorting the target player.
- Returns:
boolean, string?.
local success, reason = exports["sky_policejob"]:escortToggle(sourceId, targetId)
escortPutInVehicle(sourceId, targetId, netId?, seat?)
- Purpose: Places the escorted player into a vehicle. Without
netIdthe closest valid vehicle is used. - Returns:
boolean, string?.
local success, reason = exports["sky_policejob"]:escortPutInVehicle(sourceId, targetId)
escortTakeOutVehicle(sourceId, targetId)
- Purpose: Takes the escorted player out of a vehicle.
- Returns:
boolean, string?.
local success, reason = exports["sky_policejob"]:escortTakeOutVehicle(sourceId, targetId)
Jail
isPlayerInPrison(playerId)
- Purpose: Reports whether the player is currently serving a jail sentence.
- Returns:
boolean.
local imprisoned = exports["sky_policejob"]:isPlayerInPrison(playerId)
Devices and tracking
GetCctvCameras(jobName?)
- Purpose: Returns the deployed CCTV cameras, optionally filtered to one police job.
- Returns:
table— camera records.
local cameras = exports["sky_policejob"]:GetCctvCameras("police")
GetSpeedcamCameras()
- Purpose: Returns the deployed speed cameras.
- Returns:
table— camera records.
local speedcams = exports["sky_policejob"]:GetSpeedcamCameras()
GetMapTrackers()
- Purpose: Returns the currently broadcast GPS trackers and ankle monitors (the data shown on the police map).
- Returns:
table— tracker records.
local trackers = exports["sky_policejob"]:GetMapTrackers()
GetWheelClampOnVehicle(vehicleOrNetId, plate?)
- Purpose: Returns the wheel clamp attached to a vehicle, resolved by entity/net ID or plate.
- Returns:
table | nil—{ attached = true, netId, plate, wheelBone }ornilwhen no clamp is attached.
local clamp = exports["sky_policejob"]:GetWheelClampOnVehicle(netId)
if clamp then
print(clamp.plate, clamp.wheelBone)
end
Usable items
useItem(source, itemName, payload?)
- Purpose: Triggers a registered police usable-item handler for a player. Use this when your inventory or another resource wants to run a police item (e.g.
handcuffs,gps_tracker) without going throughRegisterUsableItem. - Returns:
boolean—truewhen a handler ran successfully; prints an English debug message when no handler is registered for the item.
exports["sky_policejob"]:useItem(source, "handcuffs")
Manual tablet registry exports
When Config.PoliceTablet.autoFillFromDatabase.citizens = false and/or Config.PoliceTablet.autoFillFromDatabase.vehicles = false, other scripts can manage the manual tablet registry entries through server exports.
If the matching autofill setting is still enabled, these exports return:
{
success = false,
error = "auto_fill_enabled"
}
Citizens
Create a manual citizen profile entry.
local result = exports["sky_policejob"]:RegisterCitizen({
identifier = "char1:abcd",
name = "Max Mustermann",
gender = "male",
dob = "1999-04-15",
job = "Unemployed",
tags = { "Wanted" },
notes = {
{ title = "Note", text = "Manual record" }
},
fingerprint = "FP-12345",
dna = "DNA-12345"
})
Update an existing manual citizen profile entry.
local result = exports["sky_policejob"]:UpdateCitizen({
identifier = "char1:abcd",
name = "Max Mustermann",
image_url = "https://example.com/citizen.png",
tags = { "Wanted", "VIP" }
})
Read or delete a manual citizen profile entry.
local citizen = exports["sky_policejob"]:GetCitizen("char1:abcd")
local deleted = exports["sky_policejob"]:DeleteCitizen("char1:abcd")
Supported citizen payload fields:
identifiernamegenderdobjobimage_urlorurlimage_idtagsnotesfingerprintdna
Vehicles
Create a manual vehicle profile entry.
local result = exports["sky_policejob"]:RegisterVehicle({
plate = "B-EMS-12",
model = "ambulance",
owner_name = "Sky Medical",
owner_identifier = "society:ambulance",
color = {
primary = "white",
secondary = "red"
}
})
Update an existing manual vehicle profile entry.
local result = exports["sky_policejob"]:UpdateVehicle({
plate = "B-EMS-12",
tags = { "Fleet" },
cases = { "CASE-1024" },
notes = {
{ title = "Storage", text = "Assigned to EMS fleet" }
}
})
Read or delete a manual vehicle profile entry.
local vehicle = exports["sky_policejob"]:GetVehicle("B-EMS-12")
local deleted = exports["sky_policejob"]:DeleteVehicle("B-EMS-12")
Supported vehicle payload fields:
platemodelownerNameorowner_nameownerIdentifierorowner_identifiercolorimage_urlorurlimage_idtagsnotescases
Weapons
Create or update a weapon entry in the weapon registry used by the tablet and the weapon checks.
local result = exports["sky_policejob"]:RegisterWeapon({
serialNumber = "SN-4815-1623",
model = "WEAPON_PISTOL",
weaponType = "Pistol",
manufacturer = "Hawk & Little",
caliber = "9mm",
ownerIdentifier = "char1:abcd",
ownerName = "Max Mustermann",
registrationStatus = "valid",
expiresAt = "2027-01-01"
})
if result.success then
print(result.data.weapon.serial_number)
end
Supported weapon payload fields:
serialNumberorserial_number(required)model(required)weaponTypeorweapon_typemanufacturercaliberownerIdentifierorowner_identifierownerNameorowner_nameregistrationStatusorregistration_status—valid,expired,revoked,lost_stolen, orevidence_holdregisteredAtorregistered_at(YYYY-MM-DD)expiresAtorexpires_at(YYYY-MM-DD)
Salary
Pause or resume salary payouts for police employees. These exports are provided by sky_jobs_base and work for all job types.
pausePlayerSalary(playerId)
- Purpose: Pauses salary payouts for the given player.
- Returns:
boolean—trueon success.
resumePlayerSalary(playerId)
- Purpose: Resumes salary payouts for the given player.
- Returns:
boolean—trueon success.
isPlayerSalaryPaused(playerId)
- Purpose: Checks whether salary payouts are currently paused.
- Returns:
boolean—trueif paused.
exports["sky_jobs_base"]:pausePlayerSalary(playerId)
exports["sky_jobs_base"]:resumePlayerSalary(playerId)
local paused = exports["sky_jobs_base"]:isPlayerSalaryPaused(playerId)
Support
Need help? Our support team is always ready to assist
Join Discord