# Interactions

{% hint style="danger" %}
ALL INTERACTION EVENTS IS GOING THROUGH SERVER EVENTS, THEY ARE SECURED ON SERVER SIDE AND THIS FILE IS OPEN SOURCE!
{% endhint %}

## Hard Cuff

Use following event to toggle Hardcuffs on Closest Player

```lua
TriggerEvent('p_policejob/hardCuff')
```

***

## Soft Cuff

Use following event to toggle Softcuffs on Closest Player

```lua
TriggerEvent('p_policejob/softCuff')
```

***

## Tie Player

Use following event to toggle Cable Tie on Closest Player

```lua
TriggerEvent('p_policejob/tiePlayer')
```

***

## Search Player

Use following event to Search Closest Player

```lua
TriggerEvent('p_policejob/searchPlayer')
```

***

## Escort Player

Use following event to toggle Escort on Closest Player

```lua
TriggerEvent('p_policejob/escortPlayer')
```

***

## isInCuffProcess

With following export you can check if player is currently in cuff process.

```lua
exports['p_policejob']:isInCuffProcess()
```

Return:

* state: `boolean`

***

## draggingPlayer

Get the player you are currently dragging or other player dragging.

```lua
LocalPlayer.state.draggingPlayer

Player(playerId).state.draggingPlayer
```

* playerId: `number`
  * Existing player server id

Return:

* state: `boolean` or `nil`

***

## draggedBy

Get the player which currently dragging you or other player.

```lua
LocalPlayer.state.draggedBy

Player(playerId).state.draggedBy
```

* playerId: `number`
  * Existing player server id

Return:

* state: `boolean` or `nil`

***

## carryingPlayer

Get the player you are currently carrying or other player carrying.

```lua
LocalPlayer.state.carryingPlayer

Player(playerId).state.carryingPlayer
```

* playerId: `number`
  * Existing player server id

Return:

* state: `boolean` or `nil`

***

## carriedBy

Get the player which currently carry you or other player.

```lua
LocalPlayer.state.draggedBy

Player(playerId).state.draggedBy
```

* playerId: `number`
  * Existing player server id

Return:

* state: `boolean` or `nil`

***

## isCuffed

Get the player cuff state.

```lua
LocalPlayer.state.isCuffed

Player(playerId).state.isCuffed
```

* playerId: `number`
  * Existing player server id

Return:

* state: `boolean` or `nil`

***

## cuffType

Get the player cuff type.

```lua
LocalPlayer.state.cuffType

Player(playerId).state.cuffType
```

* playerId: `number`
  * Existing player server id

Return:

* type: `"cuffs" / "rope"` or `"none"`

***

## hasHeadBag

Check if player has headbag on head.

```lua
LocalPlayer.state.hasHeadBag

Player(playerId).state.hasHeadBag
```

* playerId: `number`
  * Existing player server id

Return:

* state: `boolean` or `nil`


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://piotreq-scripts.gitbook.io/piotreq-scripts/assets-and-guides/police-job/client-exports/interactions.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
