From 776c592e0519fd5b3df6aeca96a0fb57a9bf98a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=5BMEF=5D=20=D0=BC=D0=B5=D1=85=D1=80=D0=BE=D0=B1?= <124378025+happy1063@users.noreply.github.com> Date: Tue, 26 Nov 2024 07:15:55 +0300 Subject: [PATCH] Update auto-heal.txt fixed bug --- auto-heal.txt | 2 ++ 1 file changed, 2 insertions(+) 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)