forked from mtcontrib/3d_armor
Add killme command to replace old kill command
This commit is contained in:
parent
9105e8403e
commit
98786fd8f7
@ -634,3 +634,13 @@ minetest.register_chatcommand("kill", {
|
|||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
minetest.register_chatcommand("killme", {
|
||||||
|
description = "Kill yourself instantly",
|
||||||
|
func = function(name)
|
||||||
|
local player = minetest.get_player_by_name(name)
|
||||||
|
if player then
|
||||||
|
player:set_hp(0)
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user