9 lines
308 B
Lua
9 lines
308 B
Lua
|
minetest.register_on_respawnplayer(function(player)
|
||
|
if player:get_hp() == 0 then
|
||
|
local name = player:get_player_name()
|
||
|
player:set_hp(20)
|
||
|
minetest.log("action", "respawn_patch: " .. name .. " restoration of life")
|
||
|
minetest.chat_send_all(dump(player:get_hp()))
|
||
|
end
|
||
|
end)
|