Advertisement
Guest User

Untitled

a guest
Jan 23rd, 2018
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.48 KB | None | 0 0
  1. original
  2. coffeeInventory.menuInterface = coffeeInventory.menuInterface or nil
  3. function coffeeInventory.open()
  4. if coffeeInventory.menuInterface then
  5. if coffeeInventory.menuInterface:IsVisible() then
  6. return
  7. end
  8. end
  9.  
  10. coffeeInventory.removeInvalidItems()
  11. coffeeInventory.menuInterface = vgui.Create( "coffeeinv_inventory" )
  12. end
  13. net.Receive( "coffeeInv_openInventory", coffeeInventory.open )
  14. hook.Add( "Think", "coffeeInventory_open", function()
  15. if input.IsKeyDown( coffeeInventory.config.openKey ) then
  16. if not LocalPlayer():IsTyping() and not gui.IsGameUIVisible() then
  17. coffeeInventory.open()
  18. end
  19. end
  20. end )
  21.  
  22.  
  23.  
  24.  
  25.  
  26.  
  27. editado
  28. editado
  29. editado
  30. editado
  31. editado
  32. editado
  33.  
  34. coffeeInventory.menuInterface = coffeeInventory.menuInterface or nil
  35. function coffeeInventory.open()
  36. if coffeeInventory.menuInterface then
  37. if coffeeInventory.menuInterface:IsVisible() then
  38. return
  39. end
  40. end
  41.  
  42. coffeeInventory.removeInvalidItems()
  43. coffeeInventory.menuInterface = vgui.Create( "coffeeinv_inventory" )
  44. end
  45.  
  46. function coffeeInventory.close()
  47.  
  48. coffeeInventory.menuInterface = vgui.Remove( "coffeeinv_inventory" )
  49. end
  50.  
  51. net.Receive( "coffeeInv_openInventory", coffeeInventory.open )
  52. hook.Add( "Think", "coffeeInventory_open", function()
  53. if input.IsKeyDown( coffeeInventory.config.openKey ) then
  54. if not LocalPlayer():IsTyping() and not gui.IsGameUIVisible() then
  55. coffeeInventory.open()
  56.  
  57. else
  58. coffeeInventory.close()
  59.  
  60. end
  61. end
  62. end )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement