2024-10-24 10:29:02 +03:00
|
|
|
minetest.register_on_respawnplayer(function(player)
|
2024-10-30 09:39:02 +03:00
|
|
|
local name = player:get_player_name()
|
|
|
|
minetest.log("action", "respawn_patch: " .. name .. ", get_hp(): " .. player:get_hp())
|
|
|
|
|
|
|
|
if player:get_hp() < 1 then
|
2024-10-24 10:29:02 +03:00
|
|
|
player:set_hp(20)
|
|
|
|
minetest.log("action", "respawn_patch: " .. name .. " restoration of life")
|
|
|
|
end
|
|
|
|
end)
|