diff --git a/auto-heal.txt b/auto-heal.txt index 107fc10..97afcf8 100644 --- a/auto-heal.txt +++ b/auto-heal.txt @@ -15,6 +15,7 @@ hook.add("PlayerHurt","",function(ply) end end) hook.add("think","",function() + if owner():isValid() and owner():isAlive() then if prop.canSpawn() then if canHeal == 1 and owner():getHealth() < 100 then prop.createSent(owner():getPos(),Angle(0),"item_healthkit") @@ -24,5 +25,6 @@ hook.add("think","",function() if canHeal == 1 and owner():getArmor() < 100 then prop.createSent(owner():getPos(),Angle(0),"item_battery") end +end end end)