# Server

## getDatabase

Get the content of database

<mark style="color:green;">**Returns**</mark>\
**database** - `table` - Content of database.json

```lua
local database = exports.msk_handcuffs:getDatabase()
```

## getPlayerFromDatabase

Get content of a specific Player from database

<mark style="color:red;">**Parameters**</mark>\
**identifier** - The identifier of a Player

<mark style="color:green;">**Returns**</mark>\
**data** - `table` - Content of database.json

<pre class="language-lua"><code class="lang-lua"><strong>local xPlayer = ESX.GetPlayerFromId(source)
</strong><strong>local data = exports.msk_handcuffs:getPlayerFromDatabase(xPlayer.identifier)
</strong><strong>
</strong><strong>--[[
</strong><strong>data.isCuffed -> boolean
</strong><strong>data.cuffItem -> string or nil
</strong><strong>data.isHardcuffed -> boolean
</strong><strong>data.hardcuffItem -> string or nil
</strong><strong>data.isAdminCuffed -> boolean
</strong><strong>data.hasAnkleTracker -> boolean
</strong><strong>data.hasHeadbag -> boolean
</strong><strong>data.hasTape -> boolean
</strong><strong>]]
</strong></code></pre>

## getIsPlayerHandcuffed

Check if a specific player is handcuffed or not

<mark style="color:red;">**Parameters**</mark>\
**player** - `table` - specific Player

<mark style="color:green;">**Returns**</mark>\
**isHandcuffed** - `boolean` - If the Player is handcuffed or not

<pre class="language-lua"><code class="lang-lua"><strong>local isHandcuffed = exports.msk_handcuffs:getIsPlayerHandcuffed({source = playerId})
</strong><strong>local isHandcuffed = exports.msk_handcuffs:getIsPlayerHandcuffed({identifier = playerIdentifier})
</strong>local isHandcuffed = exports.msk_handcuffs:getIsPlayerHandcuffed({player = xPlayer})

-- You can also use this:
Player(source).state.isHandcuffed
</code></pre>

## getIsPlayerHardcuffed

Check if a specific player is hardcuffed or not

<mark style="color:red;">**Parameters**</mark>\
**player** - `table` - specific Player

<mark style="color:green;">**Returns**</mark>\
**isHardcuffed** - `boolean` - If the Player is hardcuffed or not

```lua
local isHardcuffed = exports.msk_handcuffs:getIsPlayerHardcuffed({source = playerId})
local isHardcuffed = exports.msk_handcuffs:getIsPlayerHardcuffed({identifier = playerIdentifier})
local isHardcuffed = exports.msk_handcuffs:getIsPlayerHardcuffed({player = xPlayer})

-- You can also use this:
Player(source).state.isHardcuffed
```

## gethasPlayerAnkleTracker

Check if a specific player has an Ankletracker or not

<mark style="color:red;">**Parameters**</mark>\
**player** - `table` - specific Player

<mark style="color:green;">**Returns**</mark>\
**hasAnkletracker** - `boolean` - If the Player has an Ankletracker or not

```lua
local hasAnkletracker = exports.msk_handcuffs:gethasPlayerAnkleTracker({source = playerId})
local hasAnkletracker = exports.msk_handcuffs:gethasPlayerAnkleTracker({identifier = playerIdentifier})
local hasAnkletracker = exports.msk_handcuffs:gethasPlayerAnkleTracker({player = xPlayer})

-- You can also use this:
Player(source).state.hasAnkletracker
```

## gethasPlayerHeadbag

Check if a specific has a Headbag or not

<mark style="color:red;">**Parameters**</mark>\
**player** - `table` - specific Player

<mark style="color:green;">**Returns**</mark>\
**hasHeadbag** - `boolean` - If the Player has a Headbag or not

```lua
local hasHeadbag = exports.msk_handcuffs:gethasPlayerHeadbag({source = playerId})
local hasHeadbag = exports.msk_handcuffs:gethasPlayerHeadbag({identifier = playerIdentifier})
local hasHeadbag = exports.msk_handcuffs:gethasPlayerHeadbag({player = xPlayer})

-- You can also use this:
Player(source).state.hasHeadbag
```

## gethasPlayerTape

Check if a specific has a Tape or not

<mark style="color:red;">**Parameters**</mark>\
**player** - `table` - specific Player

<mark style="color:green;">**Returns**</mark>\
**hasTape** - `boolean` - If the Player has a Tape or not

```lua
local hasTape = exports.msk_handcuffs:gethasPlayerTape({source = playerId})
local hasTape = exports.msk_handcuffs:gethasPlayerTape({identifier = playerIdentifier})
local hasTape = exports.msk_handcuffs:gethasPlayerTape({player = xPlayer})

-- You can also use this:
Player(source).state.hasTape
```
