Tebex [2.20€]: https://www.msk-scripts.de/package/5159927
Preview: [ESX] MSK Handcuffs - YouTube
Description
- Cuff, Hardcuff or Uncuff the Player next to you
- 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
Readme.md (included)
Events for Jobs
-- serverside
xPlayer.triggerEvent('msk_handcuffs:checkCuff', item)
-- example
xPlayer.triggerEvent('msk_handcuffs:checkCuff', 'cuffs')
xPlayer.triggerEvent('msk_handcuffs:checkCuff', 'hardcufffs')
xPlayer.triggerEvent('msk_handcuffs:checkCuff', 'cuff_keys')
-- clientside
TriggerEvent('msk_handcuffs:checkCuff', source, item)
-- example
TriggerEvent('msk_handcuffs:checkCuff', source, 'cuffs')
TriggerEvent('msk_handcuffs:checkCuff', source, 'hardcufffs')
TriggerEvent('msk_handcuffs:checkCuff', source, 'cuff_keys')
ServerCallbacks
- You have to use them clientside
-- Get Cuff Status from the player next to you
ESX.TriggerServerCallback('msk_handcuffs:getCuffStatus', function(isCuffed)
if isCuffed then
-- add your code here
else
-- add your code here
end
end, GetPlayerServerId(closestPlayer))
-- Get the Cuff Status from yourself
ESX.TriggerServerCallback('msk_handcuffs:getCuffStatus:self', function(isCuffed)
if isCuffed then
-- add your code here
else
-- add your code here
end
end)
Config
Config = {}
----------------------------------------------------------------
Config.Locale = 'de'
Config.VersionChecker = true
Config.Debug = true
Config.getSharedObject = 'esx:getSharedObject'
----------------------------------------------------------------
-- Items // You have to use 'cuffs' before you can use 'hardcuffs'
Config.Items = {
cuff = 'cuffs', -- item: 'cuffs' // DisableAllControlActions exept Movement
hardcuff = 'hardcuff', -- item: 'hardcuff' // Freeze Player Position
uncuff = 'cuff_keys' -- item: 'cuff_keys' // Uncuff a Player
}
Config.InteractSound = true -- You need InteractSound for that (https://forum.cfx.re/t/release-play-custom-sounds-for-interactions/8282)
----------------------------------------------------------------
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
}
----------------------------------------------------------------
-- 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 function is clientside AND serverside !!!
-- Look for type == 'client' and type == 'server'
function notification(src, type, xPlayer, message) -- xPlayer = ESX.GetPlayerFromId(src)
if type == 'client' then -- clientside
ESX.ShowNotification(message) -- replace this with your Notify
elseif type == 'server' then -- serverside
xPlayer.showNotification(message) -- replace this with your Notify
end
end
Optional Requirements
- InteractSounds ([Release] Play Custom Sounds for Interactions)
My other Scripts
- [ESX] MSK Armor - Multiple Armor Vests
- [ESX] MSK Banking - NativeUI
- [ESX/QBCore] MSK Simcard - Change your phonenumber
- [ESX] MSK Shopsystem - NativeUI & Database Feature
- [ESX] MSK WeaponAmmo | Clips, Components & Tints
Code is accessible | No |
Subscription-based | No |
Lines (approximately) | ~460 |
Requirements | ESX 1.2 and above; mysql-async or oxmysql |
Support | Yes |