For the complete documentation index, see llms.txt. This page is also available as Markdown.

configHandcuffs.lua

--[[
    t_police_handcuffs = { name = 't_handcuffs', label = 'Police Handcuffs Key', weight = 100, type = 'item', image = 't_handcuffs.png', unique = false, useable = true, shouldClose = true, description = '' },
    t_police_handcuffs_key = { name = 't_police_handcuffs_key', label = 'Police Handcuffs Key', weight = 100, type = 'item', image = 't_handcuffs.png', unique = false, useable = true, shouldClose = true, description = '' },

    t_handcuffs = { name = 't_handcuffs', label = 'Handcuffs', weight = 100, type = 'item', image = 't_handcuffs.png', unique = false, useable = true, shouldClose = true, description = '' },
    t_handcuffs_key = { name = 't_handcuffs_key', label = 'Handcuffs Key', weight = 100, type = 'item', image = 't_handcuffs.png', unique = true, useable = true, shouldClose = true, description = '' },
]]

config.inVehicle = {   -- It is used to transport handcuffed and injured players in and out of the vehicle.
    active = true,     -- When set to `true`, the system is activated.
    deadPlayer = true, -- When set to true, you can transport dead players in and out of the vehicle.
    commandsGlobal = { "vio" },
    commandsIn = { "vi" },
    commandsOut = { "vo" },
    dist = 5.0,
    enter = {              -- Enter vehicle settings
        progressbar = {
            active = true, -- When set to `true`, a progress bar will be shown when the player is being loaded into the vehicle.
            time = 2500    -- Progressbar time
        }
    },
    exit = {               -- Exit vehicle settings
        progressbar = {
            active = true, -- When set to `true`, a progress bar will be shown when the player is being unloaded from the vehicle.
            time = 2500    -- Progressbar time
        }
    }
}

config.escordDist = 1.5   -- The maximum distance between players required to escort another player.
config.handcuffsDit = 1.5 -- The maximum distance between players required to handcuff or unlock another player.

config.escort = {         -- Handcuffed and dead player escort/carry settings
    commands = { "escort" },
    deadCarry = {
        active = true,              -- When set to `true`, players can escort dead player
        dist = config.escordDist,
        progressbarCarryActive = {  -- Show progressbar before you start escort the player
            active = true,          -- When true, the progressbar is displayed before the escort dead player
            time = 2500,            -- Progressbar time
        },
        progressbarCarryDisable = { -- Show progressbar before releasing the player
            active = true,          -- When true, the progressbar is displayed before the escort dead player
            time = 2500,            -- Progressbar time
        },
        disables = {                -- Movement restrictions for carry players.
            disableJump = true,
            disableLookBehing = false,
            disableExitVehicle = true,
            disableEnterVehicle = true,
            disableSprint = true,
            disableClimping = true,
        },
        breakWhenRagdoll = true, -- When true, if the player enters the ragdoll, the escort is canceled.
        animation = {
            carrier = {
                dict = "pcarryl1@animations",
                anim = "pcarryl1clip",
                flags = 50,
            },
            target = {
                dict = "pcarryl2@animations",
                anim = "pcarryl2clip",
                flags = 1,
                attach = {
                    pos = { x = 0.050, y = 0.070, z = 0.020 },
                    rot = { x = 0.000, y = 0.000, z = 0.000 },
                    bone = 24818,
                    rotationOrder = 1
                }
            }
        },

    },
}

--[[
When `keyIsGlobal` is set to `true`, all handcuffs in that config can be unlocked with a single key. This is ideal for police, as it allows Officer A to handcuff someone and Officer B to unlock them with their own key.
When set to `false`, the key for the handcuffs is given to the player who applied them, and only that specific key can unlock the handcuffs.
]]

config.handcuffs = {
    active = true, -- When set to `true`, the handcuff system is enabled.
    items = {
        -- Handcuffs 1
        t_police_handcuffs = {              -- Handcuff item name pkelepce
            key = 't_police_handcuffs_key', -- pkelepceanahtar
            keyIsGlobal = true,             -- As explained above.
            dist = config.handcuffsDit,     -- The maximum distance between players required to handcuff or unlock another player.
            breakable = {                   -- U can edit minigame from editable handcuffBreakableMiniGame()
                active = true,              -- When true, the handcuffed player can break the handcuff while being handcuffed
                sendNotif = true,           -- If the player succeeds in the minigame, a notification is sent to the handcuffer.
                time = 1,                   -- Progressbar time
            },
            escort = {
                active = true,              -- When set to `true`, players can escort handcuffed player
                dist = config.escordDist,
                progressbarCarryActive = {  -- Show progressbar before you start escort the player
                    active = true,          -- When true, the progressbar is displayed before the escort
                    time = 2500,            -- Progressbar time
                },
                progressbarCarryDisable = { -- Show progressbar before releasing the player
                    active = true,          -- When true, the progressbar is displayed before the escort
                    time = 2500,            -- Progressbar time
                },
                disables = {                -- Movement restrictions for carry players.
                    disableJump = false,
                    disableLookBehing = false,
                    disableExitVehicle = true,
                    disableEnterVehicle = true,
                    disableSprint = false,
                    disableClimping = false,
                },
                breakWhenRagdoll = true -- When true, if the player enters the ragdoll, the escort is canceled.
            },
            sound = {                   -- U can edit player sound function from editable
                handcuff = {
                    fileName = "handcuff",
                    volume = 0.5,
                    distance = 1.5,
                },
                uncuff = {
                    fileName = "uncuff",
                    volume = 0.5,
                    distance = 1.5,
                }
            },
            types = {
                {
                    active = true, -- When set to `true`, rear-handcuffing is enabled.
                    disables = {   -- Movement restrictions for handcuffed players.
                        disableJump = true,
                        disableLookBehing = true,
                        disableExitVehicle = true,
                        disableEnterVehicle = true,
                        disableSprint = true,
                        disableClimping = true,
                    },
                    lockpick = {               -- Lockpick settings (u can edit minigame from editable lockpickingMiniGame())
                        active = false,        -- When set to `true`, others players can unlock the handcuffs with a lockpick.
                        itemName = "lockpick", -- Lockpick item name
                        progressbar = {        -- Progressbar settings
                            active = true,
                            time = 2500,
                        },
                        minigame = { -- Minigame settings
                            active = true,
                            time = 1000,
                            attempts = 3,  -- Number of attempts
                        },
                        removeItem = true, -- When set to `true`, the lockpick item is removed from the player's inventory after use.
                    },
                    type = 'rear',         -- Don't change
                },
                {
                    active = true, -- When set to `true`, front-handcuffing is enabled.
                    disables = {   -- Movement restrictions for handcuffed players.
                        disableJump = true,
                        disableLookBehing = true,
                        disableExitVehicle = true,
                        disableEnterVehicle = true,
                        disableSprint = true,
                        disableClimping = true,
                    },
                    lockpick = {               -- Lockpick settings (u can edit minigame from editable lockpickingMiniGame())
                        active = false,        -- When set to `true`, other players can unlock the handcuffs with a lockpick.
                        itemName = "lockpick", -- Lockpick item name
                        progressbar = {        -- Progressbar settings
                            active = true,
                            time = 2500,
                        },
                        minigame = { -- Minigame settings
                            active = true,
                            time = 1000,
                            attempts = 3,  -- Number of attempts
                        },
                        removeItem = true, -- When set to `true`, the lockpick item is removed from the player's inventory after use.
                    },
                    type = 'front',        -- Don't change
                }
            }
        },

        -- Handcuffs 2
        t_handcuffs = {
            key = 't_handcuffs_key',
            keyIsGlobal = false,
            dist = config.handcuffsDit,
            breakable = {
                active = false,
                sendNotif = true,
                time = 1,
            },
            escort = {
                active = true,
                dist = config.escordDist,
                progressbarCarryActive = {
                    active = true,
                    time = 2500,
                },
                progressbarCarryDisable = {
                    active = true,
                    time = 2500,
                },
                disables = {
                    disableJump = true,
                    disableLookBehing = false,
                    disableExitVehicle = true,
                    disableEnterVehicle = true,
                    disableSprint = true,
                    disableClimping = true,
                },
                breakWhenRagdoll = true
            },
            sound = {
                handcuff = {
                    fileName = "handcuff",
                    volume = 0.5,
                    distance = 1.5,
                },
                uncuff = {
                    fileName = "uncuff",
                    volume = 0.5,
                    distance = 1.5,
                }
            },
            types = {
                {
                    active = false,
                    type = 'rear',
                    disables = {
                        disableJump = true,
                        disableLookBehing = true,
                        disableExitVehicle = true,
                        disableEnterVehicle = true,
                        disableSprint = true,
                        disableClimping = true,
                    },
                    lockpick = {
                        active = true,
                        itemName = "lockpick",
                        progressbar = {
                            active = true,
                            time = 2500,
                        },
                        minigame = {
                            active = false,
                            time = 2500,
                            attempts = 3,
                        },
                        removeItem = true,
                    },
                },
                {
                    active = true,
                    type = 'front',
                    disables = {
                        disableJump = true,
                        disableLookBehing = true,
                        disableExitVehicle = true,
                        disableEnterVehicle = true,
                        disableSprint = true,
                        disableClimping = true,
                    },
                    lockpick = {
                        active = true,
                        itemName = "lockpick",
                        progressbar = {
                            active = true,
                            time = 2500,
                        },
                        minigame = {
                            active = false,
                            time = 2500,
                            attempts = 3,
                        },
                        removeItem = true,
                    },
                }
            }
        },
    },
    test = false, -- don't change
}

Last updated