Advertisement
Shark_vil

Untitled

Oct 16th, 2020
458
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.34 KB | None | 0 0
  1. if (CLIENT) then return; end;
  2.  
  3. local HookName = "WeaponSwitch.Delay"
  4. local DelayTime = 3;
  5.  
  6. hook.Add("PlayerSwitchWeapon", HookName, function(ply, oldWeapon, newWeapon)
  7.     ply.WeaponSwitchDelay = ply.WeaponSwitchDelay or 0;
  8.     if (ply.WeaponSwitchDelay > CurTime()) then
  9.         return true;
  10.     end
  11.     ply.WeaponSwitchDelay = CurTime() + DelayTime;
  12. end);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement