diff options
| -rw-r--r-- | entities/weapons/hands.lua | 11 | ||||
| -rw-r--r-- | gamemode/client/cl_weaponswitch.lua | 9 |
2 files changed, 11 insertions, 9 deletions
diff --git a/entities/weapons/hands.lua b/entities/weapons/hands.lua index 7b5c042..9c7059e 100644 --- a/entities/weapons/hands.lua +++ b/entities/weapons/hands.lua @@ -155,6 +155,17 @@ function SWEP:SecondaryAttack() end --Make sure we have a weapon end +--Prevent switching away from the hands weapon +hook.Add("PlayerSwitchWeapon","prevent_switch",function(ply,oldwep,newwep) + return false +end) + +if CLIENT then + hook.Add( "HUDShouldDraw", "HideWeaponSelHUD", function( name ) + if name == "CHudWeaponSelection" then return false end + end ) +end + hook.Add("PlayerSpawn","give_hands",function(ply) ply:Give("hands") end) diff --git a/gamemode/client/cl_weaponswitch.lua b/gamemode/client/cl_weaponswitch.lua deleted file mode 100644 index 2f681c9..0000000 --- a/gamemode/client/cl_weaponswitch.lua +++ /dev/null @@ -1,9 +0,0 @@ -local gm = GM or GAMEMODE - -function gm:PlayerSwitchWeapon( ply, oldWeapon, newWeapon ) - return false -end - -hook.Add( "HUDShouldDraw", "HideWeaponSelHUD", function( name ) - if name == "CHudWeaponSelection" then return false end -end ) |
