# Installation Handcuff

This installation guide covers both <mark style="color:red;">ESX</mark> and <mark style="color:blue;">QBCore</mark> frameworks.

## What is required for installation

* 0r-core [<mark style="color:blue;">(Download)</mark>](https://github.com/0resmon/0r-core)
* ox\_lib [(Download)](https://github.com/overextended/ox_lib/releases/download/v3.18.0/ox_lib.zip)

## Setup for Ox Inventory

Open the <mark style="color:blue;">**ox\_inventory/data/items.lua**</mark> file. And place the following code.

<pre class="language-lua"><code class="lang-lua"><strong>["cuffs"] = {
</strong>    label = "Cuffs",
    weight = 1,
    stack = true,
    close = true,
},

["cuffkeys"] = {
<strong>    label = "Cuff Keys",
</strong>    weight = 1,
    stack = true,
    close = true,
},

["electrocuff"] = {
    label = "Electro Cuffs",
    weight = 1,
    stack = true,
    close = true,
},

["electrocufftracker"] = {
    label = "Electro Cuff Tracker",
    weight = 1,
    stack = true,
    close = true,
},

["headbag"] = {
    label = "Head Bag",
    weight = 1,
    stack = true,
    close = true,
},

["rope"] = {
    label = "Rope",
    weight = 1,
    stack = true,
    close = true,
},

["mouthtape"] = {
    label = "Mouth Tape",
    weight = 1,
    stack = true,
    close = true,
},

</code></pre>

## Setup for QB Inventories

The best thing about these inventories is that their infrastructure is qb-inventory. That's why the installations are the same.

Place these items in items.lua in your inventories. (qb-inventory to qb-core/shared/items.lua)

```lua
cuffkeys = { name = 'cuffkeys',  label = 'Cuffkeys',  weight = 100, type = 'item', image = 'cuffkeys.png', unique = false,  useable = true, shouldClose = true,  combinable = nil, description = 'Cuffkeys'},
cuffs = { name = 'cuffs', label = 'Cuffs', weight = 100, type = 'item',  image = 'cuffs.png', unique = false, useable = true, shouldClose = true, combinable = nil, description = 'Cuffs'},
electrocuff = { name = 'electrocuff', label = 'Electro Cuffs', weight = 100, type = 'item', image = 'electrocuff.png', unique = false, useable = true, shouldClose = true, combinable = nil, description = 'Electro Cuffs'},
electrocufftracker = { name = 'electrocufftracker', label = 'Electro Cuff Tracker', weight = 100, type = 'item',  image = 'electrocufftracker.png',  unique = false,useable = true, shouldClose = true, combinable = nil, description = 'Electro Cuff Tracker'},
headbag = {name = 'headbag', label = 'Head Bag', weight = 100, type = 'item', image = 'headbag.png', unique = false, useable = true, shouldClose = true, combinable = nil, description = 'Head Bag'},
mouthtape = {name = 'mouthtape', label = 'Mouth Tape', weight = 100, type = 'item', image = 'mouthtape.png', unique = false, useable = true, shouldClose = true, combinable = nil, description = 'Mouth Tape'},
rope = {name = 'rope', label = 'Rope', weight = 100, type = 'item', image = 'rope.png', unique = false, useable = true, shouldClose = true, combinable = nil, description = 'Rope'}
```

## Even though I'm handcuffed, I can raise my hands.

To prevent this, I'm making a small correction for those using qb. Open the **qb-smallresources/client/handsup.lua** file. Then replace this code

```lua
local handsUp = false

RegisterCommand(Config.HandsUp.command, function()
    local ped = PlayerPedId()
    if not HasAnimDictLoaded('missminuteman_1ig_2') then
        RequestAnimDict('missminuteman_1ig_2')
        while not HasAnimDictLoaded('missminuteman_1ig_2') do
            Wait(10)
        end
    end
    handsUp = not handsUp
    if exports['0r-handcuffs']:isHandcuffed() then return end
    if handsUp then
        TaskPlayAnim(ped, 'missminuteman_1ig_2', 'handsup_base', 8.0, 8.0, -1, 50, 0, false, false, false)
        exports['qb-smallresources']:addDisableControls(Config.HandsUp.controls)
    else
        ClearPedTasks(ped)
        exports['qb-smallresources']:removeDisableControls(Config.HandsUp.controls)
    end
end, false)

RegisterKeyMapping(Config.HandsUp.command, 'Hands Up', 'keyboard', Config.HandsUp.keybind)
exports('getHandsup', function() return handsUp end)
```

## server.cfg

The server.cfg initialization order should be as follows.

{% hint style="danger" %}
If you are going to use an apartment system, pay attention to the server.cfg sequence. The motel system must be initialized before your multicharacter script.
{% endhint %}

### ESX

```
start es_extended
start 0r-core
start 0r_handcuffs_remake
--- esx resources --
```

### QBCore

```
start qb-core
start 0r-core
start 0r_handcuffs_remake
--- qbcore resources --
```


---

# 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://docs.0resmon.org/0resmon/0r-resources/0r-handcuff/installation.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.
