simple-shooter-game/mods/game/autoheal/init.lua
a-bad-dev feba0eac84 Split the main mod into several smaller mods
yes, this means   m o r e   g l o b a l s
2025-12-12 16:43:14 -04:00

14 lines
337 B
Lua

-- Autohealing mod for SSG
local timer = 0
core.register_globalstep(function(dtime)
timer = timer + dtime
if timer >= 10 then
timer = 0
for _, player in pairs(core.get_connected_players()) do
if alive_players[player:get_player_name()] == "alive" then
player:set_hp(math.min(player:get_hp() + 2, 20))
end
end
end
end)