Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local cook_here = false
- hook.Add( "Think", "nogolod", function()
- cook_here = false
- for _,pl in pairs( player.GetAll() ) do
- if pl:Team() == TEAM_POVAR then
- cook_here = true
- return
- end
- end
- end )
- -- Nowadays HungerMod
- hook.Add( "golod", "nogolod", function()
- if !cook_here then
- return true
- end
- end )
- -- Old HungerMod
- hook.Add( "PostGamemodeLoaded", "nogolod", function()
- local HookTable = hook.GetTable()
- if istable( HookTable )
- and istable( HookTable["Think"] )
- and isfunction( HookTable["Think"]["HMThink"] ) then
- local old_HMThink = HookTable["Think"]["HMThink"]
- hook.Add( "Think", "HMThink", function( ... )
- if cook_here then
- return old_HMThink( ... )
- end
- end )
- end
- end )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement