不死
This commit is contained in:
parent
304951e257
commit
5bdefc1a72
@ -60,6 +60,13 @@ core.register_chatcommand("clear_chat_queue", {
|
||||
end,
|
||||
})
|
||||
|
||||
core.register_chatcommand("respawn", {
|
||||
description = core.gettext("Respawn"),
|
||||
func = function(param)
|
||||
core.send_respawn()
|
||||
end,
|
||||
})
|
||||
|
||||
function core.run_server_chatcommand(cmd, param)
|
||||
core.send_chat_message("/" .. cmd .. " " .. param)
|
||||
end
|
||||
|
@ -10,14 +10,5 @@ dofile(clientpath .. "chatcommands.lua")
|
||||
dofile(commonpath .. "vector.lua")
|
||||
|
||||
core.register_on_death(function()
|
||||
core.display_chat_message("You died.")
|
||||
local formspec = "size[11,5.5]bgcolor[#320000b4;true]" ..
|
||||
"label[4.85,1.35;" .. fgettext("You died.") .. "]button_exit[4,3;3,0.5;btn_respawn;".. fgettext("Respawn") .."]"
|
||||
core.show_formspec("bultin:death", formspec)
|
||||
end)
|
||||
|
||||
core.register_on_formspec_input(function(formname, fields)
|
||||
if formname == "bultin:death" then
|
||||
core.send_respawn()
|
||||
end
|
||||
core.display_chat_message("You died.Respawn: .respawn")
|
||||
end)
|
||||
|
Loading…
x
Reference in New Issue
Block a user