Garry's Mod

Garry's Mod

55 ratings
Handcuffs SWEP 2.0
   
Award
Favorite
Favorited
Unfavorite
Content Type: Addon
Addon Type: Weapon
Addon Tags: Fun, Roleplay, Realism
File Size
Posted
Updated
12.543 MB
Oct 21, 2024 @ 7:16am
Apr 12 @ 3:31pm
8 Change Notes ( view )

Subscribe to download
Handcuffs SWEP 2.0

Description
What is different about this version?
This version uses my library to setup a convar menu and it changes the gui styles.
It's also the only version that I will update from now on so the original is officially out of support.

You can type "/hs" in chat to open the convar menu (host only)

This addon has a dlc "Handcuffs SWEP - Extras", it is not required to have both!

Features
  • Handcuffs - SWEP
  • World model + Viewmodel
  • Handcuffs key - ENTITY and SWEP
  • Lockpick - SWEP
  • Confiscating items
  • Attaching players to world entity
  • Dragging players
  • Forcing players in and out of vehicles (works better with simfphys vehicles)
  • Escape tracking - escaping from handcuffs in unintended ways is detected
  • Audio
  • 13 convars + 3 commands


Convars and commands

Convars
  • HS_VehicleEnteringAllowed - disable or enables entering vehicles
  • HS_VehicleExitingAllowed - disables or enables exiting vehicles
  • HS_UseButtonAllowed - disables or enables the "+USE" button, typically bound to "E"
  • HS_EscapeAllowed - disables or enables automatic handcuff system when the players escape from handcuffs
  • HS_SpawnMenuAllowed - disables or enables opening the spawn menu (you still can't use it to spawn anything I don't see a reason why you should be able to)
  • HS_ContextMenuAllowed - disables or enables opening the context menu (you can't edit entities)
  • HS_NoclipAllowed - disables or enables noclipping
  • HS_LockpickYourself - disables or enables lockping yourself out of handcuffs (you must have a lockpick)
  • HS_LockpickPlayers - disables or enables lockpicking other players out of handcuffs (with a lockpick in hand)
  • HS_HandCuffsBlockLockpicking - disables or enables blocking the lockpicking mechanic if you failed a certain amount of times
  • HS_LockpickCycles - sets the amount of cycles you have to go through while lockpicking
  • HS_LockpickMaxFails - sets the max amount of fails before the handcuffs are blocked from being lockpicked
  • HS_LockpickMaxStrikes - sets the max amount of strikes you can have before you fail the lockpicking
  • HS_HandcuffsLockOutTime - sets the delay before you can start lockpicking again (in seconds)

Commands
  • Cuffs_reset_model - if the handcuffs model doesn't dissapear after being uncuffed you can use this to remove it manually
  • Cuffs_reset_models - removes all handcuff models
  • HS - opens convar menu (Host only)


Controls

Handcuffs
  • Left click - handcuffs a player
  • Right click - handcuffs yourself
  • Middle mouse button - force player in or out of a vehicle
  • Reload key (R) - opens confiscation menu for the player
  • Use key (E) - starts or stops dragging the player, while dragging the player and looking at the ground it will attach the player to the ground

Handcuffs key - ENTITY
  • Move within it's range while handcuffed to uncuff yourself

Handcuffs key - SWEP
  • Left click - uncuffs a player
  • Right click - uncuffs yourself (you can't select it when you're handcuffed but you can still right click to use it)

Lockpick
  • Left click on a handcuffed player to start lockpicking them (if you're handcuffed you can left click to start lockpicking yourself)
39 Comments
Uzi  [author] Apr 12 @ 3:32pm 
Should also be fixed hopefully
джамбо харламик Apr 12 @ 12:16pm 
[Handcuffs SWEP 2.0] lua/weapons/swep_handcuffs.lua:46: Tried to use a NULL entity!
1. GetPos - [C]:-1
2. func - lua/weapons/swep_handcuffs.lua:46
3. unknown - lua/includes/extensions/net.lua:34
this error occurs even when working with players.
Uzi  [author] Mar 7 @ 1:09pm 
Should be "fixed" however this error really shouldn't be happening unless it can't give the weapon to the player for some reason.
[Handcuffs SWEP 2.0] lua/autorun/handcuffs.lua:24: attempt to index local 'wep' (a nil value)
1. CuffPosition - lua/autorun/handcuffs.lua:24
2. HandCuff - lua/autorun/handcuffs.lua:424
3. unknown - lua/weapons/swep_handcuffs.lua:151

Timer Failed! [Simple][@lua/weapons/swep_handcuffs.lua (line 144)]

Please help me. This addon is just lovely, exactly what I was looking for.
Uzi  [author] Feb 24 @ 3:40am 
No
Salfither132 Feb 24 @ 3:38am 
Is it works on NPC?
Uzi  [author] Feb 18 @ 2:53am 
@Borziy I added it, type "HS" into console for the list of convars.
Borziy Feb 18 @ 2:25am 
Can you add an option in menu to remove speed debuff that gets applied to cuffed players?
Uzi  [author] Feb 17 @ 7:01am 
@Borziy
The first error appeared because the player didn't have a weapon when it was setting the weapon holdtype, that's also why they didn't appear like in the screenshot.
The second error appeared because the player already had the weapon when it was trying to restore it so the reference didn't exist.

Both errors should be fixed now hopefully.
Borziy Feb 17 @ 6:27am 
On a server running this addon, any handcuffed player model appears as holding an invisible gun/rifle instead of how shown in the mod's screenshots. Also a lua error message always pops up when anyone get handcuffed, here's how it looks like (copied it to pastebin): https://pastebin.com/iHeQ965A