Tebex [5.99€ incl. VAT] - Encrypted
Tebex [9.99€ incl. VAT] - Only serverside encrypted
Documentation
YouTube Preview
Description
- Cuff, Hardcuff or Uncuff the closest Player
- Drag and Undrag the closest Player
- Cuff players with items
- Cuff players with commands
- Timer for uncuff players
- Animations and Sounds
- Admin commands
- Cuff Status will be saved to database and restored after relog
- Example to implement this in esx_policejob [Read the Readme.md]
- Discord Logs
Config
Config = {}
----------------------------------------------------------------
Config.Locale = 'de'
Config.VersionChecker = true
Config.Debug = true
----------------------------------------------------------------
-- Add the Webhook Link in server_discordlog.lua
Config.DiscordLog = true
Config.botColor = "6205745" -- https://www.mathsisfun.com/hexadecimal-decimal-colors.html
Config.botName = "MSK Scripts"
Config.botAvatar = "https://i.imgur.com/PizJGsh.png"
----------------------------------------------------------------
-- !!! This function is clientside AND serverside !!!
-- Look for type == 'client' and type == 'server'
Config.Notification = function(src, action, xPlayer, message) -- xPlayer = ESX.GetPlayerFromId(src)
if action == 'client' then -- clientside
MSK.Notification(message) -- replace this with your Notify
elseif action == 'server' then -- serverside
MSK.Notification(src, message) -- replace this with your Notify
end
end
----------------------------------------------------------------
-- You have to use 'cuffItems' before you can use 'hardcuffItems'
-- If you use a Command then always the first item inside the table will be used
-- So with {'cuffs', 'cable_ties'} always item 'cuffs' will be used for Commands
-- You can set multiple items // Add them in your database
Config.cuffItems = {'cuffs', 'cable_ties'} -- DisableAllControlActions exept Movement
Config.hardcuffItems = {'hardcuff'} -- Freeze Player Position
Config.uncuffItems = {'cuff_keys', 'scissors'} -- Uncuff a Player
----------------------------------------------------------------
Config.InteractSound = true -- You need InteractSound for that (https://github.com/plunkettscott/interact-sound/releases)
Config.checkOnPlayerLoaded = true -- Check cuff status from DB if the player join the server and cuffs the player if cuff Stauts is true
Config.addCuffItems = true -- Set to false if you don't want to give the cuffs item back if you uncuff someone
----------------------------------------------------------------
Config.Timer = {
enable = true, -- Set false to disable this feature
time = 30 -- in minutes // After this time the player gets uncuffed
}
----------------------------------------------------------------
-- Player Commands
Config.PlayerCommands = {
cuffCommand = 'cuff', -- default: 'cuff' // Set false if you dont want the Command
hardcuffCommand = 'hardcuff', -- default: 'hardcuff' // Set false if you dont want the Command
uncuffCommand = 'uncuff', -- default: 'uncuff' // Set false if you dont want the Command
dragCommand = 'drag', -- default: 'drag' // Drags the closest Player // Set false if you dont want the Command
undragCommand = 'undrag' -- default: 'undrag' // Undrags the closest Player // Set false if you dont want the Command
}
----------------------------------------------------------------
-- Admin Commands
Config.AdminGroups = {'superadmin', 'admin'} -- You can set multiple groups
Config.AdminCommands = {
cuffCommand = 'adcuff', -- default: 'cuff' // example: /cuff playerID
hardcuffCommand = 'adhardcuff', -- default: 'hardcuff' // example: /adhardcuff playerID
uncuffCommand = 'aduncuff' -- default: 'uncuff' // example: /aduncuff playerID
}
----------------------------------------------------------------
-- !!! This functions are clientside ONLY !!!
-- To deactivate the Radio Channel if someone is handcuffes
Config.Voice = false -- Set to 'salty', 'pma' or false to deactivate this feature
Config.SetRadioChannel = function()
if not Config.Voice then return end
if Config.Voice:match('salty') then
exports["saltychat"]:SetRadioChannel("", true) -- https://github.com/v10networkscom/saltychat-fivem#setradiochannel
elseif Config.Voice:match('pma') then
exports["pma-voice"]:setVoiceProperty("radioEnabled", false) -- https://github.com/AvarianKnight/pma-voice/blob/main/docs/client-setters/setVoiceProperty.md
exports["pma-voice"]:SetRadioChannel(0) -- https://github.com/AvarianKnight/pma-voice/blob/main/docs/client-setters/setRadioChannel.md
end
end
----------------------------------------------------------------
-- !!! This functions are clientside ONLY and inside a Thread (triggerd every frame) !!!
Config.Method = 'whitelist' -- Set to 'whitelist' or 'blacklist'
-- This is triggerd if the player gets cuffed
Config.Handcuffed = function()
if Config.Method:match('whitelist') then
EnableControlAction(0, 1, true) -- Camera Movement
EnableControlAction(0, 2, true) -- Camera Movement
EnableControlAction(0, 245, true) -- T
EnableControlAction(0, 23, true) -- F (Enter Vehicle)
EnableControlAction(0, 75, true) -- F (Exit Vehicle)
elseif Config.Method:match('blacklist') then
DisableControlAction(0, 24, true) -- Attack
DisableControlAction(0, 257, true) -- Attack 2
DisableControlAction(0, 25, true) -- Aim
DisableControlAction(0, 263, true) -- Melee Attack 1
DisableControlAction(0, 45, true) -- Reload
DisableControlAction(0, 22, true) -- Jump
DisableControlAction(0, 44, true) -- Cover
DisableControlAction(0, 37, true) -- Select Weapon
DisableControlAction(0, 288, true) -- F1
DisableControlAction(0, 289, true) -- F2
DisableControlAction(0, 170, true) -- F3
DisableControlAction(0, 167, true) -- F6
DisableControlAction(0, 73, true) -- X
DisableControlAction(2, 199, true) -- P
DisableControlAction(0, 59, true) -- Disable steering in vehicle
DisableControlAction(0, 71, true) -- Disable driving forward in vehicle
DisableControlAction(0, 72, true) -- Disable reversing in vehicle
DisableControlAction(2, 36, true) -- Disable going stealth
DisableControlAction(0, 47, true) -- Disable weapon
DisableControlAction(0, 264, true) -- Disable melee
DisableControlAction(0, 257, true) -- Disable melee
DisableControlAction(0, 140, true) -- Disable melee
DisableControlAction(0, 141, true) -- Disable melee
DisableControlAction(0, 142, true) -- Disable melee
DisableControlAction(0, 143, true) -- Disable melee
end
end
-- This is triggerd if the player gets uncuffed
Config.notHandcuffed = function()
-- Add your code here
end
Optional Requirements
- InteractSounds ([Release] Play Custom Sounds for Interactions)
Code is accessible | No |
Subscription-based | No |
Lines (approximately) | ~460 |
Requirements | ESX 1.2 and above, oxmysql, msk_core |
Support | Yes |
My other Scripts
Paid
- [ESX] MSK Armor - Multiple Armor Vests
- [ESX] MSK Banking | Advanced Bankingsystem
- [ESX] MSK Crafting - Advanced Craftingsystem with NativeUI
- [ESX] MSK Garage and Impound with NativeUI
- [ESX] MSK Handcuffs - Realistic Handcuffs
- [ESX] MSK Shopsystem - Advanced Shopsystem with NativeUI
- [ESX / QBCore] MSK Simcard - Change your phonenumber
- [ESX] MSK WeaponAmmo | Clips, Components & Tints
Free
- [ESX] MSK Backpack | Chezza Inventory
- [ESX] MSK Deathcounter - integrated in myMultichar
- [Re-Release] EngineToggle
- GitHub - Musiker15/msk_givevehicle: Give Vehicles with Command or Item and Delete Vehicles with Command
- GitHub - MSK-Scripts/msk_rgbHeadlights: [ESX] Changeable Vehicle Headlights with an Item
- [ESX] MSK SaveCoordMenu
- [ESX/QBCore] MSK SecretBlips - Show and delete Blips with an item
- GitHub - MSK-Scripts/msk_webhook: [STANDALONE] Send Discord Webhooks
- GitHub - MSK-Scripts/msk_weaponammoitems: [ESX] Weapon Ammunition as Items