WasteLands_Survival/mods/ws_core/chatcommands.lua
discon-nected 38342e0e64
bug fix
2019-04-09 07:12:24 +12:00

14 lines
367 B
Lua

minetest.register_chatcommand("heal", {
description = "sets maximum HP, thirst, breath and hunger values",
privs = {fly = true},
func = function(name)
local player = minetest.get_player_by_name(name)
thirst.set_player_thirst(name, 20)
hbhunger.heal(player)
player:set_hp(20)
player:set_breath(11)
return true, "You have been healed!"
end,
})