Advertisement
Guest User

Untitled

a guest
Feb 23rd, 2019
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.82 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. elseif string.sub(bind, 1, 4) == "slot" and pressed then
  23. local idx = tonumber(string.sub(bind, 5, -1)) or 1
  24. WeaponSelection:SetSelection(idx)
  25. return true
  26. end
  27.  
  28. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement