Installation Handcuff

0Resmon Handcuff Installation Document and Basic Concepts

This installation guide covers both ESX and QBCore frameworks.

What is required for installation

Setup for Ox Inventory

Open the ox_inventory/data/items.lua file. And place the following code.

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

["cuffkeys"] = {
    label = "Cuff Keys",
    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,
},

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)

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

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.

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

Last updated