About Lock Me Up - Handcuffs
Lock Up the nasty players! Admins or players with permissions will have the ability to spawn handcuffs and use them to lock up victims or npc's while also giving them the ability to escort or loot their target. This system was heavily inspired by the Rustoria/OTV developers.
Usage
Equip the handcuff item in your belt and make sure it's selected, go near a player/npc and hold E button.
Current Futures Include (check the config bellow as well)
- Support for permissions
- Handcuff item type, skin & stack are changeble
- Handcuffed player can be looted
- Handcuffed player can be escorted
- - By Foot
- - In Vehicle Ground/Air/Water
- - Dragged behind the Vehicle with adjustable distance
- NPCs can be handcuffed as well (all the above apply)
- Adjustable on handcuff time
- Option to cancel on spotted
- Option to escort the player floating or stick to ground
- Inventory slots can be locked on handcuffed
- Handcuff message changable
- Adjustable access to locked player
- Adjustable lock/cuff protection
- Configurable blocked Chat & Console commands for handcuffed players
- Handcuff item stack can be made unlimited
- Option to unlock player on warden death
- Option to keep victim locked on death
- Option to change victim clothes on handcuff
More futures may be taken in consideration after they are suggested and discussed.
Commands [Chat & Console]
cuff _all|PlayerName|SteamID - Lock the target through a Server Console or F1 Console command (Admin Only)
(Chat: /hcuffs | Console hcuffs) ~
~ /hcuffs _self Amount - Give yourself handcuffs (Chat only)
~ /hcuffs PlayerName|SteamID Amount - Give the target player handcuffs
~ /hcuffs _all Amount - Give everyone in the server handcuffs (Admin Only)
/lock - Lock|Unlock yourself
:: Example Command for Server Rewards: hcuffs $player.id 1
Quote
API
Check if target is Restrained
Quoteprivate bool IsRestrained(BasePlayer target)
Restrain Player - For self-restrain use player as attacker
Quoteprivate void RestrainPlayer(BasePlayer player, BasePlayer attacker)
Unrestrain Player
- save = Saves the player into the data, usually used when player disconnect
- ride = Additional checks for players inside a vehicle
Quoteprivate void UnRestrainPlayer(BasePlayer player, bool save = false, bool ride = false)
Default Config
Config is pretty much self explementary.
Quote{
"Item Spawn Permission": "lockmeup.spawn",
"Item Use Permission": "",
"Permission to use self Lock/Unlock": "lockmeup.self",
"Item Name": "Hand Cuffs",
"Item Skin ID": 2102994025,
"Item Max Stack": 20,
"Item Masking - Short Name": "metalspring",
"Lock Seconds Interval": 2.0,
"Cancel on Spotted": false,
"Can Lock NPCs": true,
"Stick to Ground": false,
"Lock Inventory": {
"Main": false,
"Wear": false,
"Belt": true,
"Backpack": false
},
"Lock Messages": {
"Victim": "<color=#C24641>You've been Locked</color>: {name}",
"Attacker": "<color=#C24641>You've Locked</color>: {name}"
},
"Can Lock in SafeZone": {
"Anyone": false,
"Permission": "lockmeup.safezone",
"Admin": true
},
"Access to Locked Players": {
"Anyone": false,
"Permission": "lockmeup.access",
"Admin": true
},
"Lock Protection": {
"Permission": "lockmeup.protect",
"Admin": true
},
"Blocked Commands while Locked": [
"tp"
],
"Can Drag With Vehicle": {
"Enabled": false,
"Distance": 6.0
},
"Unlimited Item Usage": {
"Permission": "lockmeup.usage",
"Admin": true
},
"Blocked Console while Locked": [
"tp"
],
"Can Ride in Vehicle": true,
"Unlock on Warden Death": false,
"Unlock on Victim Death": true,
"Unlock on Victim Disconnect": false,
"Cuffs Button - (Use = 256) (Middle Mouse = 134217728) (Sprint = 128) (Duck = 64) (Reload = 8192)": 256,
"Change Victim Clothes": {
"Enabled": false,
"Clothes List (max 7) - shortName: skinID": {
"hat.beenie": "2281372995",
"burlap.shirt": "2281363953",
"burlap.trousers": "2281243846"
}
}
}