mirror of
https://github.com/minetest-mods/3d_armor.git
synced 2024-12-27 19:20:39 +01:00
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