# 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`
