2
0

death_formspec.lua 494 B

123456789101112131415
  1. -- CSM death formspec. Only used when clientside modding is enabled, otherwise
  2. -- handled by the engine.
  3. core.register_on_death(function()
  4. local formspec = "size[11,5.5]bgcolor[#320000b4;true]" ..
  5. "label[4.85,1.35;" .. fgettext("You died") ..
  6. "]button_exit[4,3;3,0.5;btn_respawn;".. fgettext("Respawn") .."]"
  7. core.show_formspec("bultin:death", formspec)
  8. end)
  9. core.register_on_formspec_input(function(formname, fields)
  10. if formname == "bultin:death" then
  11. core.send_respawn()
  12. end
  13. end)