mirror of
https://github.com/a-bad-dev/simple-shooter-game.git
synced 2026-06-08 20:12:11 +00:00
14 lines
337 B
Lua
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)
|