Skip to main content

Config

The config.lua keys are backwards compatible with v2. New in v3 are Config.MaxDistance and Config.Target.system.

Key reference

KeyTypeDescription
Config.LocalestringLanguage key ('de', 'en') from translation.lua
Config.DebugbooleanVerbose logging. Keep false on live servers
Config.VersionCheckerbooleanCheck GitHub for updates on start
Config.MaxDistancenumberServer-validated max distance (meters) between officer and target for any action
Config.DiscordLogbooleanEnable Discord webhook logs
Config.TargettableTarget integration — system is 'auto', 'ox_target' or 'qb-target'
Config.cuffItems / hardcuffItems / uncuffItemstableItem names that trigger the respective action
Config.ItemSettingstableMaps a cuff item to the uncuff item(s) allowed to open it
Config.GiveCuffItemBacktableWhether the cuff item is returned on uncuff
Config.RestrictItemstablePer-job item/option restrictions (server-enforced)
Config.CommandstablePlayer commands (/cuff, /hardcuff, /uncuff)
Config.AnkleTracker / HeadBag / TapetableItem, removeItem, command and options per feature
Config.UncuffOnPlayerDiedbooleanAuto-uncuff on death
Config.checkOnPlayerLoadedtableWhich statuses are re-applied on (re)spawn
Config.playSoundtableSounds per action (files in html/sounds)
Config.TimertableServer-driven auto-uncuff timer (minutes)
Config.EnableProps / Config.Propsboolean / tableAttached prop models per item
Config.AdminGroups / Config.AdminCommandstableAdmin command groups & names
Config.VoicetableDisable radio while cuffed / mute via Tape ('pma' or 'salty')
Config.Methodstring'blacklist' or 'whitelist' control scheme while cuffed

Full default config

Config = {}
Config.Locale = 'de'
Config.Debug = false
Config.VersionChecker = true

-- Server-validated max distance (meters) for any officer -> target action.
Config.MaxDistance = 3.0

Config.DiscordLog = true
Config.botColor = "6205745"
Config.botName = "MSK Scripts"
Config.botAvatar = "https://i.imgur.com/PizJGsh.png"

-- Runs clientside AND serverside.
Config.Notification = function(source, message, typ)
if IsDuplicityVersion() then
MSK.Notification(source, 'MSK Handcuffs', message, typ, 5000)
else
MSK.Notification('MSK Handcuffs', message, typ, 5000)
end
end

Config.Target = {
enable = true,
system = 'auto', -- 'auto' | 'ox_target' | 'qb-target'
undragHotkey = 'X',
options = {
cuff = true, hardcuff = true, uncuff = true,
ankletracker = true, headbag = true, tape = true,
drag = true, putInCar = true, putOutOfCar = true,
}
}

Config.cuffItems = {'cuffs', 'cable_ties'}
Config.hardcuffItems = {'hardcuff'}
Config.uncuffItems = {'cuff_keys', 'scissors'}

Config.ItemSettings = {
['cuffs'] = {'cuff_keys'},
['cable_ties'] = {'scissors'},
}

Config.GiveCuffItemBack = {
['cuffs'] = true, ['cable_ties'] = false, ['hardcuff'] = true,
['ankletracker'] = true, ['headbag'] = true, ['tape'] = true,
}

Config.RestrictItems = {
enable = true,
defaultItems = {
cuffItem = 'cable_ties', hardcuffItem = 'hardcuff', uncuffItem = 'scissors',
enableAnkletracker = false, enableHeadbag = true, enableTape = true,
},
jobItems = {
['police'] = {
cuffItem = 'cuffs', hardcuffItem = 'hardcuff', uncuffItem = 'cuff_keys',
enableAnkletracker = true, enableHeadbag = true, enableTape = true,
},
['doj'] = {
cuffItem = 'cuffs', hardcuffItem = 'hardcuff', uncuffItem = 'cuff_keys',
enableAnkletracker = true, enableHeadbag = true, enableTape = true,
},
}
}

Config.Commands = {
cuff = {enable = true, command = 'cuff', item = 'cable_ties', jobs = {['police'] = 'cuffs', ['doj'] = 'cuffs'}},
hardcuff = {enable = true, command = 'hardcuff', item = 'hardcuff', jobs = {['police'] = 'hardcuff', ['doj'] = 'hardcuff'}},
uncuff = {enable = true, command = 'uncuff', item = 'scissors', jobs = {['police'] = 'cuff_keys', ['doj'] = 'cuff_keys'}},
}

Config.AnkleTracker = {
enable = true,
refreshTime = 5.0,
item = 'ankletracker',
removeItem = 'ankletracker_key', -- must differ from item
command = 'ankletracker',
blip = {id = 1, color = 15, scale = 0.8, prefix = 'Track'},
jobs = {'police', 'fib', 'sheriff', 'doj'},
}

Config.HeadBag = {enable = true, item = 'headbag', removeItem = 'headbag_key', command = 'headbag'}
Config.Tape = {enable = true, item = 'tape', removeItem = 'tape_key', command = 'tape'}

Config.UncuffOnPlayerDied = true

Config.checkOnPlayerLoaded = {
cuff = true, hardcuff = false, ankleTracker = true, headbag = false, tape = false,
}

Config.playSound = {
enable = true,
cuff = 'cuff.ogg', hardcuff = 'cuff.ogg', uncuff = 'uncuff.ogg',
ankleTracker = 'cuff.ogg', headBag = false, tape = false,
}

Config.Timer = {enable = true, time = 30} -- minutes, server-driven

Config.EnableProps = true
Config.Props = {
['cuffs'] = `p_cs_cuffs_02_s`,
['cable_ties'] = `p_cs_cuffs_02_s`,
['hardcuff'] = nil,
['cuff_keys'] = `prop_cuff_keys_01`,
['scissors'] = `prop_cuff_keys_01`,
[Config.AnkleTracker.item] = nil,
[Config.HeadBag.item] = `prop_money_bag_01`,
[Config.Tape.item] = `prop_gaffertape`,
}

Config.AdminGroups = {'superadmin', 'admin'}
Config.AdminCommands = {
cuff = {enable = true, command = 'adcuff', playAnimation = false},
hardcuff = {enable = true, command = 'adhardcuff'},
uncuff = {enable = true, command = 'aduncuff'},
ankleTracker = {enable = true, command = 'adankletracker'},
headbag = {enable = true, command = 'adheadbag'},
tape = {enable = true, command = 'adtape'},
}

Config.Voice = {enable = false, voice = 'pma'} -- 'pma' | 'salty'
Config.Method = 'blacklist' -- 'blacklist' | 'whitelist'

Notes on key options

Config.MaxDistance (new)

Every officer→target action is re-validated on the server using OneSync coordinates. The client also does a 2.0m pre-check for responsiveness; the server uses Config.MaxDistance (slightly higher to absorb latency).

Config.RestrictItems

When enable = true, the server ignores any item the client claims and uses the job-specific item instead. This prevents a manipulated client from cuffing with another job's item.

Config.Target.system

  • 'auto' — uses ox_target if running, otherwise qb-target.
  • 'ox_target' / 'qb-target' — force a specific system.