Shark_vil

Untitled

Oct 16th, 2020
320
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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);
RAW Paste Data