Supported Games
RustyCuffs adds handcuff mechanics to rust by allowing you to restrain and escort other players.
Support
For direct support add me on Discord: Revolving DCON#1337
Video
Check out the demo video here
Features
- Restrain / unrestrain players
- Restrain AI (optional)
- Escort / unescort
- Execute (kill)
- Create handcuffs and key items
- Anti wall clipping (construction only)
- Chat commands
- Permissions
- Changeable chat prefix and icon
- Configurable
Usage
Equip the cuffs item with /cuffs <player> (requires rustycuffs.admin to be set) or by finding it. Look at a player while holding the cuffs item and hold the RELOAD key, this will restrain the player. If using the rustycuffs.unlimited permission, you can use the cuffs again to interact with the restrained player. If not, you can use the cuffs key that is created to interact with the restrained player using the reload key. The cuffs key must belong to the restrained player for it to work (they key item will be renamed to their name).
Permissions
rustycuffs.admin- Allows the use of chat commandsrustycuffs.use- Allows players to use rusty cuffsrustycuffs.unlimited- Allows infinte usage of a single cuffs itemrustycuffs.escort- Allows player to escort a targetrustycuffs.viewinventory- Allows player to view the inventory of a targetrustycuffs.execute- Allows player to kill the target from the select menurustycuffs.createkey- Allows player to create a key from the select menurustycuffs.usecuffkeys- Allows player to use cuff keysrustycuffs.unrestrain- Allows player to unrestrain target
Chat Commands
Chat commands require the rustycuffs.admin permission to be set
/restrain <player>- Restrain target/unrestrain <player>- Unrestrain target/cuffsmenu <player>- Open the select menu on target (must be restrained)/cuffs <player>- Gives target the cuffs item/cuffskey <player>- Gives player a key for the targets cuffs/cuffsbot- Spawn a bot (for testing)
Frequently Asked Questions
Question: Why can't I unrestrain people in moving vehicles or elevators?
Answer: Rust connects players to the moving volume that you're standing in. Due to this behavior a pretty bad bug occurs when trying to unrestrain while in this volume that causes the client to crash. I disable players input by forcing them to spectate themself and spectating while in this volume causes an array of issues. It's something I'm aware of and will approach this behavior differently in a future patch.
Question: Why do people hover when unrestrained at a height?
Answer: When I disable a players input I force them to spectate themselves, this disables physics for the player. This too will be addressed in a future patch.
Question: Is this the same as the paid handcuff plugins?
Answer: No, I took a different approach to this plugin, I did not want the restrained target to constantly be following the player, I found this unrealistic and mechanically too rewarding for the player. By forcing the restrained target in front of the player, their the line of sight is restricted and makes combat impossible without killing the restrained target thus making the decision to escort somebody penalizing.
Question: If I'm escorting somebody can't I just clip them through a wall and loot what's behind it?
Answer: No. When a target enters or is pushed through construction (base etc), the target becomes automatically unescorted and moved away from the object.
Configuration
{
"Chat Prefix": "[ 16][#00ffff]Rusty Cuffs[/#][/ ]: ", // Prefix before all chat messages
"Chat Icon": 76561199105408156, // Chat Icon for all messages
"Return Cuffs": true, // Do players get cuffs back when a key is used to unrestrain target
"Restrain Time": 1.0, // How long does it take to restrain a target
"Restrain Distance": 2.0, // How far away can players restrain targets
"Escort Distance": 0.9, // How far infront do targets hover when being escorted
"Restrain NPCs": true // Allow the use of NPCs to be restrained
}
Developers
API
Check to see if a player is restrained
private bool API_IsRestrained(BasePlayer player)
Create handcuffs item
private Item API_CreateCuffs(int amount)
Create key item for specified player
private Item API_CreateCuffsKey(BasePlayer player)
Restrain player
private bool API_Restrain(BasePlayer target, BasePlayer player)
Unrestrain player
private bool API_Unrestrain(BasePlayer target, BasePlayer player)
Hooks
Can player start the restraining process on a target
private object CanCuffsPlayerStartRestrain(BasePlayer target, BasePlayer player){
Puts("CanCuffsPlayerStartRestrain works!");
return null;
}
Can player restrain the target
private object CanCuffsPlayerRestrain(BasePlayer target, BasePlayer player){
Puts("CanCuffsPlayerRestrain works!");
return null;
}
Can target be unrestrained
private object CanCuffsPlayerUnrestrain(BasePlayer target){
Puts("CanCuffsPlayerUnrestrain works!");
return null;
}
Can player select the target (bring up menu)
private object CanCuffsPlayerSelect(BasePlayer target, BasePlayer player){
Puts("CanCuffsPlayerSelect works!");
return null;
}
Can player start escorting the target
private object CanCuffsPlayerEscort(BasePlayer target, BasePlayer player){
Puts("CanCuffsPlayerEscort works!");
return null;
}
Can player stop escorting the target
private object CanCuffsPlayerEscortStop(BasePlayer target, BasePlayer player){
Puts("CanCuffsPlayerEscortStop works!");
return null;
}
Can player view the targets inventory
private object CanCuffsPlayerViewInventory(BasePlayer target, BasePlayer player){
Puts("CanCuffsPlayerViewInventory works!");
return null;
}
Can player kill the target (stab damage type)
private object CanCuffsPlayerExecute(BasePlayer target, BasePlayer player){
Puts("CanCuffsPlayerExecute works!");
return null;
}
Can player use keys on the target
private object CanCuffsPlayerUseKey(BasePlayer target, BasePlayer player){
Puts("CanCuffsPlayerUseKey works!");
return null;
}
Can player use cuffs on the target
private object CanCuffsPlayerUseCuffs(BasePlayer target, BasePlayer player){
Puts("CanCuffsPlayerUseCuffs works!");
return null;
}
Called when a player starts being restrained
private void OnCuffsPlayerStartRestrain(BasePlayer target, BasePlayer player){
Puts("OnCuffsPlayerStartRestrain works!");
}
Called when a player is restrained
private void OnCuffsPlayerRestrain(BasePlayer target, BasePlayer player){
Puts("OnCuffsPlayerRestrain works!");
}
Called when a player is unrestrained
private void OnCuffsPlayerUnrestrain(BasePlayer target){
Puts("OnCuffsPlayerUnrestrain works!");
}
Called when a player is selected
private void OnCuffsPlayerSelect(BasePlayer target, BasePlayer player){
Puts("OnCuffsPlayerSelect works!");
}
Called when a player starts to escort a target
private void OnCuffsPlayerEscort(BasePlayer target, BasePlayer player){
Puts("OnCuffsPlayerEscort works!");
}
Called when a player stops escorting a target
private void OnCuffsPlayerEscortStop(BasePlayer target, BasePlayer player){
Puts("OnCuffsPlayerEscortStop works!");
}
Called when a player views a targets inventory
private void OnCuffsPlayerViewInventory(BasePlayer target, BasePlayer player){
Puts("OnCuffsPlayerViewInventory works!");
}
Called when a player kills a target
private void OnCuffsPlayerExecute(BasePlayer target, BasePlayer player){
Puts("OnCuffsPlayerExecute works!");
}
Called when a player uses a key
private void OnCuffsPlayerUseKey(BasePlayer target, BasePlayer player){
Puts("OnCuffsPlayerUseKey works!");
}
Called when a player uses cuffs
private void OnCuffsPlayerUseCuffs(BasePlayer target, BasePlayer player){
Puts("OnCuffsPlayerUseCuffs works!");
}
Todo
- Add ability to move players into vehicles
- Add lockpicks
Known bugs
- Players float when unescorted in the air
- Players have a chance of dying when put through a wall in the train tunnel (this is due to the player breaking the new water displacement volume and technically are out of bounds / at the kill depth)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

