Browse docs

Client Exports

Client-side exports provided by the Sky Police Job resource.

Restraints

cuffPlayer(cuffType?)

  • Purpose: Toggles the cuff state for the nearest player as an officer.
  • Arguments:
    • cuffType (string?): "cuffs" (default) or "zipties".
  • Returns: boolean, string?.
exports["sky_policejob"]:cuffPlayer()

uncuffPlayer()

  • Purpose: Removes cuffs from the nearest player as an officer.
  • Returns: boolean, string?.
exports["sky_policejob"]:uncuffPlayer()

cutZipties()

  • Purpose: Cuts zipties on the nearest player as an officer.
  • Returns: boolean, string?.
exports["sky_policejob"]:cutZipties()

useCuffPlayer(cuffType?) / useUncuffPlayer() / useCutZipties()

  • Purpose: The civilian variants — usable from another resource without requiring the player to be a police officer. They still respect the Config.CivilianUse rules.
  • Returns: boolean, string?.
exports["sky_policejob"]:useCuffPlayer("cuffs") -- or "zipties"
exports["sky_policejob"]:useUncuffPlayer()
exports["sky_policejob"]:useCutZipties()

useHandcuffsItem() / useZiptiesItem()

  • Purpose: Runs the full handcuffs/zipties item flow (the same path as using the inventory item), including the item checks.
  • Returns: boolean.
exports["sky_policejob"]:useHandcuffsItem()
exports["sky_policejob"]:useZiptiesItem()

isPlayerCuffed(serverId)

  • Purpose: Checks the locally known cuff state for a player.
  • Returns: boolean.
local cuffed = exports["sky_policejob"]:isPlayerCuffed(serverId)

useHeadBag()

  • Purpose: Uses a head bag on the nearest player without requiring the player to be a police officer. Respects Config.CivilianUse.headBag.
  • Returns: boolean, string?.
exports["sky_policejob"]:useHeadBag()

Escort

escortToggle()

  • Purpose: Starts or stops escorting the nearest player.
  • Returns: boolean, string?.
exports["sky_policejob"]:escortToggle()

escortPutInVehicle()

  • Purpose: Puts the escorted player into the closest vehicle.
  • Returns: boolean, string?.
exports["sky_policejob"]:escortPutInVehicle()

escortTakeOutVehicle()

  • Purpose: Takes the escorted player out of a vehicle.
  • Returns: boolean, string?.
exports["sky_policejob"]:escortTakeOutVehicle()

Jail

openJailMenu()

  • Purpose: Opens the menu to put someone in jail.
exports["sky_policejob"]:openJailMenu()

Radial menu actions

Other resources (e.g. a custom radial menu or keybind resource) can read and trigger the police radial actions instead of using the built-in radial menu.

Available action IDs: handcuff, unhandcuff, leg_restraints, escort, escort_vehicle, escort_take_out, player_search, carry_patient, impound, wheel_clamp, wheel_clamp_remove, camera_disassemble, billing, tablet.

getRadialActions()

  • Purpose: Returns every radial action currently offered to the local player, including its availability state.
  • Returns: table — array of action records (id, label, disabled, …). Empty when the radial system is disabled.
local actions = exports["sky_policejob"]:getRadialActions()

getRadialAction(actionId)

  • Purpose: Returns a single radial action record by ID.
  • Returns: table | nil.
local action = exports["sky_policejob"]:getRadialAction("handcuff")

getRadialActionReport()

  • Purpose: Returns all actions plus a per-ID availability map — useful to build an external menu in one call.
  • Returns: table{ actions = { ... }, availability = { [actionId] = { available, disabledReasonKey, disabledReason } } }.
local report = exports["sky_policejob"]:getRadialActionReport()
if report.availability["handcuff"] and report.availability["handcuff"].available then
    -- show the handcuff option
end

isRadialMenuActionAvailable(actionId)

  • Purpose: Checks whether one radial action is currently available.
  • Returns: boolean.
local available = exports["sky_policejob"]:isRadialMenuActionAvailable("impound")

triggerRadialMenuAction(actionId)

  • Purpose: Executes a radial action for the local player.
  • Returns: boolean, table?true on success, otherwise false and a reason ({ key, fallback }).
local success, reason = exports["sky_policejob"]:triggerRadialMenuAction("player_search")

Usable items

useItem(itemName, payload?)

  • Purpose: Triggers a registered client-side police usable-item handler for the local player.
  • Returns: booleantrue when a handler ran successfully; prints an English debug message when no handler is registered for the item.
exports["sky_policejob"]:useItem("bodycam")

Support

Need help? Our support team is always ready to assist

Join Discord