Advertisement
Guest User

Hook Editions

a guest
Feb 23rd, 2019
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.65 KB | None | 0 0
  1. hook.Add("PlayerBindPress", "bindlolwtf", function(ply, bind, pressed)
  2.  
  3.     if not IsValid(ply) then return end
  4.     if bind == "invnext" and pressed and !input.IsMouseDown(MOUSE_LEFT) then
  5.         if (!ply:InVehicle()) then
  6.             WeaponSelection:Call()
  7.             WeaponSelection:NextWeapon()
  8.         end
  9.         return true
  10.     elseif bind == "invprev" and pressed and !input.IsMouseDown(MOUSE_LEFT) then
  11.         if (!ply:InVehicle()) then
  12.             WeaponSelection:Call()
  13.             WeaponSelection:PrevWeapon()
  14.          end
  15.         return true
  16.     elseif bind == "+attack" then
  17.         if (WeaponSelection:ShouldDraw()) then
  18.             WeaponSelection:Call()
  19.             WeaponSelection:SelectWeapon()
  20.             return true
  21.         end
  22.     end
  23.  
  24. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement