-- hurtingzone.lua -- Damages the player's health while he remains in the trigger zone. -- Assign this script to a Trigger Zone -- Scripted by Perelect. 29.11.2015 local loop = 0 local delay local damage function hurtingzone_init(e) delay = 1 -- This is the delay between health damages in seconds. damage = 1 -- This is the amount of damage done to the players health, each loop. end function hurtingzone_main(e) if g_Entity[e]['plrinzone']==1 and g_PlayerHealth > 0 then if loop == 0 then StartTimer(e) loop = 1 end if GetTimer(e) >= (delay*1000) then HurtPlayer(e,damage) loop = 0 end ActivateIfUsed(e) end end