Garry's Mod

Garry's Mod

Not enough ratings
[TTT/Sandbox] Handcuffs (Fixed)
   
Award
Favorite
Favorited
Unfavorite
Content Type: Addon
Addon Type: ServerContent
File Size
Posted
Updated
976.549 KB
6 Oct, 2020 @ 6:57am
18 May @ 7:08am
11 Change Notes ( view )

Subscribe to download
[TTT/Sandbox] Handcuffs (Fixed)

Description
Thanks to Porter for the TTT Handcuffs mod which this is an update to.

Edits (and replaces) the original version to fix a few issues

How Does it Work?
  • You can buy it as Detective in the Shop.
  • Choose the Handcuffs and Click with the Primary Attack on another Player.
  • You get the Message: "Player was cuffed" and the other Player get the Message: "You was cuffed."
  • The Player who was cuffed drops all his weapons (except for not weapons that are not dropable) and can't up any weapons!
  • The Player will be cuffed for 30 seconds unless the Detective deactivates it with the Secondary Attack or the Player dies or disconnects or the round ends. The amount of time is configurable and if set to 0 they will stay cuffed forever.
  • When the cuffs are removed (either by using the Secondary Attack or when the timer expires) both the Detective and the Player are told.
  • Players can only be cuffed once per round
  • Only one player can be cuffed at a time (by default, but this is configurable)

Changes
  • Fixes crowbars being repeatedly dropped if they are droppable (like in the Custom Roles for TTT addon) when cuffs are used on a player that is already cuffed
  • Fixes players not being uncuffed when they died
  • Fixes all players being uncuffed when one player disconnected
  • Fixes multiple handcuffs not being usable by different people at the same time
  • Changed to save non-droppable weapons and give them back after a player is un-cuffed
  • Updated to work in Sandbox
  • Added new TTTPlayerHandcuffed hook

Convars
ttt_handcuff_time 30 // The amount of seconds a player should stay handcuffed. Set to 0 to keep the target handcuffed until the handcuff secondary attack is used on them. ttt_handcuff_multiple 0 // Whether multiple players can be handcuffed by the same person.

Developers
This version of the handcuffs adds a hook to detect when a player has been handcuffed
TTTPlayerHandcuffed(owner, target, time)
Realm: Server
Params:
  • owner - The player using the handcuffs
  • target - The player being handcuffed
  • time - The amount of time the target will be handcuffed

Special Thanks
  • Porter for the TTT Handcuffs mod which this is an update to
  • The people who Porter thanked from the original addon:
  • Alex and other members of the Lonely Yogs[lonely-yogs.co.uk] Discord for using my versions of these addons and helping me fix and improve them

Source Code
https://github.com/Malivil/TTT-Handcuffs
3 Comments
Oddbase 12 Dec, 2020 @ 7:11pm 
ah sweet i will check it out
Malivil  [author] 12 Dec, 2020 @ 4:47pm 
I've never done Sandbox stuff before but I did an update and it seems to work?
Oddbase 12 Dec, 2020 @ 4:01pm 
would it be possible to make them work in sandbox?