# Player Interaction Actions

> Reference for Player Interaction Actions in sky_jobs_base.

[All server exports](/docs/base/jobs-base/server-exports)

## Player Interaction Actions

Every action export below validates the acting player's current whitelist access. Target existence, distance, vehicle state, restraint state, items, and inventory operations are also validated where applicable.

<callout color="warning" icon="i-lucide-shield-alert">

These are trusted server-side integration points. Never forward an options table, target ID, network ID, seat, item name, amount, or metadata directly from an unvalidated client event.

</callout>

### Handcuffs and zipties

<table>
<thead>
  <tr>
    <th>
      Export
    </th>
    
    <th>
      Returns
    </th>
    
    <th>
      Purpose
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        cuffPlayer(sourceId, targetId, cuffType, options?)
      </code>
    </td>
    
    <td>
      <code>
        boolean, string?
      </code>
    </td>
    
    <td>
      Applies <code>
        cuffs
      </code>
      
       or <code>
        zipties
      </code>
      
      .
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        uncuffPlayer(sourceId, targetId, options?)
      </code>
    </td>
    
    <td>
      <code>
        boolean, string?
      </code>
    </td>
    
    <td>
      Removes the target's current cuffs or zipties.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        cutZipties(sourceId, targetId, options?)
      </code>
    </td>
    
    <td>
      <code>
        boolean, string?
      </code>
    </td>
    
    <td>
      Cuts the target's zipties with the configured cutter.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        isPlayerCuffed(targetId)
      </code>
    </td>
    
    <td>
      <code>
        boolean
      </code>
    </td>
    
    <td>
      Reads the shared cuff state.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        getCuffConfig()
      </code>
    </td>
    
    <td>
      <code>
        table
      </code>
    </td>
    
    <td>
      Returns a read-only snapshot of <code>
        Config.PoliceCuffs
      </code>
      
      .
    </td>
  </tr>
</tbody>
</table>

Trusted options for `cuffPlayer` are `ignoreItemCheck`, `allowSelf`, and `forceNormal`. `uncuffPlayer` and `cutZipties` accept `allowSelf` and `forceNormal`. Whitelist and distance validation cannot be disabled.

```lua
local success, reason = exports["sky_jobs_base"]:cuffPlayer(
    source,
    targetId,
    "cuffs"
)
```

Escape opportunities are not exposed as a forceable integration API. The server rolls and validates them from `Config.PoliceCuffs.escape`, including timing, expected keys, round progression, cooldowns, and final restraint removal.

### Leg restraints

<table>
<thead>
  <tr>
    <th>
      Export
    </th>
    
    <th>
      Returns
    </th>
    
    <th>
      Purpose
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        applyLegRestraints(sourceId, targetId)
      </code>
    </td>
    
    <td>
      <code>
        boolean, string?
      </code>
    </td>
    
    <td>
      Applies leg restraints after all access and target checks.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        removeLegRestraints(sourceId, targetId)
      </code>
    </td>
    
    <td>
      <code>
        boolean, string?
      </code>
    </td>
    
    <td>
      Removes the target's leg restraints.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        isPlayerLegRestrained(targetId)
      </code>
    </td>
    
    <td>
      <code>
        boolean
      </code>
    </td>
    
    <td>
      Reads the shared leg-restraint state.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        getLegRestraintsTargetState(targetId)
      </code>
    </td>
    
    <td>
      <code>
        table
      </code>
    </td>
    
    <td>
      Returns the target's validated cuff and leg-restraint state.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        getLegRestraintsConfig()
      </code>
    </td>
    
    <td>
      <code>
        table
      </code>
    </td>
    
    <td>
      Returns a read-only snapshot of <code>
        Config.LegRestraints
      </code>
      
      .
    </td>
  </tr>
</tbody>
</table>

### Escort and vehicles

<table>
<thead>
  <tr>
    <th>
      Export
    </th>
    
    <th>
      Returns
    </th>
    
    <th>
      Purpose
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        escortToggle(sourceId, targetId)
      </code>
    </td>
    
    <td>
      <code>
        boolean, string?
      </code>
    </td>
    
    <td>
      Starts or stops escorting a cuffed target.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        escortPutInVehicle(sourceId, targetId, netId, seat)
      </code>
    </td>
    
    <td>
      <code>
        boolean, string?
      </code>
    </td>
    
    <td>
      Places an escorted target into a nearby networked vehicle.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        escortTakeOutVehicle(sourceId, targetId)
      </code>
    </td>
    
    <td>
      <code>
        boolean, string?
      </code>
    </td>
    
    <td>
      Removes a nearby cuffed target from a vehicle.
    </td>
  </tr>
</tbody>
</table>

`escortToggle` requires `escort`; the two vehicle exports require `vehicle`.

### Head bag

<table>
<thead>
  <tr>
    <th>
      Export
    </th>
    
    <th>
      Returns
    </th>
    
    <th>
      Purpose
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        useHeadBag(sourceId, targetId, action)
      </code>
    </td>
    
    <td>
      <code>
        boolean, string?
      </code>
    </td>
    
    <td>
      Uses <code>
        apply
      </code>
      
      , <code>
        remove
      </code>
      
      , or <code>
        toggle
      </code>
      
      .
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        applyHeadBag(sourceId, targetId)
      </code>
    </td>
    
    <td>
      <code>
        boolean, string?
      </code>
    </td>
    
    <td>
      Applies a head bag.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        removeHeadBag(sourceId, targetId)
      </code>
    </td>
    
    <td>
      <code>
        boolean, string?
      </code>
    </td>
    
    <td>
      Removes a head bag.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        isPlayerHeadBagged(targetId)
      </code>
    </td>
    
    <td>
      <code>
        boolean
      </code>
    </td>
    
    <td>
      Reads the shared head-bag state.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        getHeadBagTargetState(targetId)
      </code>
    </td>
    
    <td>
      <code>
        table
      </code>
    </td>
    
    <td>
      Returns <code>
        success
      </code>
      
      , <code>
        hooded
      </code>
      
      , and <code>
        restrained
      </code>
      
      .
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        getHeadBagConfig()
      </code>
    </td>
    
    <td>
      <code>
        table
      </code>
    </td>
    
    <td>
      Returns a read-only snapshot of <code>
        Config.HeadBag
      </code>
      
      .
    </td>
  </tr>
</tbody>
</table>

### Player search

<table>
<thead>
  <tr>
    <th>
      Export
    </th>
    
    <th>
      Returns
    </th>
    
    <th>
      Purpose
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        getSearchTargetInventory(sourceId, targetId)
      </code>
    </td>
    
    <td>
      <code>
        table
      </code>
    </td>
    
    <td>
      Returns the validated target inventory and weapons.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        searchTransfer(sourceId, targetId, transferType, name, amount, metadata?)
      </code>
    </td>
    
    <td>
      <code>
        table
      </code>
    </td>
    
    <td>
      Transfers a validated item from the target to the acting player.
    </td>
  </tr>
</tbody>
</table>

`searchTransfer` currently accepts only `transferType = "storage"`. The target must remain nearby and restrained for the initial read and every transfer.

<br />
