Advertisement
Guest User

Untitled

a guest
Aug 24th, 2016
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1. local cook_here = false
  2. hook.Add( "Think", "nogolod", function()
  3. cook_here = false
  4. for _,pl in pairs( player.GetAll() ) do
  5. if pl:Team() == TEAM_POVAR then
  6. cook_here = true
  7. return
  8. end
  9. end
  10. end )
  11.  
  12. -- Nowadays HungerMod
  13. hook.Add( "golod", "nogolod", function()
  14. if !cook_here then
  15. return true
  16. end
  17. end )
  18.  
  19. -- Old HungerMod
  20. hook.Add( "PostGamemodeLoaded", "nogolod", function()
  21. local HookTable = hook.GetTable()
  22. if istable( HookTable )
  23. and istable( HookTable["Think"] )
  24. and isfunction( HookTable["Think"]["HMThink"] ) then
  25. local old_HMThink = HookTable["Think"]["HMThink"]
  26. hook.Add( "Think", "HMThink", function( ... )
  27. if cook_here then
  28. return old_HMThink( ... )
  29. end
  30. end )
  31. end
  32. end )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement