diff --git a/mods/addcrosshair/depends.txt b/mods/addcrosshair/depends.txt new file mode 100644 index 0000000..331d858 --- /dev/null +++ b/mods/addcrosshair/depends.txt @@ -0,0 +1 @@ +default \ No newline at end of file diff --git a/mods/addcrosshair/init.lua b/mods/addcrosshair/init.lua new file mode 100644 index 0000000..b85061d --- /dev/null +++ b/mods/addcrosshair/init.lua @@ -0,0 +1,16 @@ +local function setflags(player) + player:hud_set_flags({crosshair=false}) +end +minetest.register_on_joinplayer(function(player) + + local hud = player:hud_add({ + hud_elem_type = "image", + position = {x = .5, y = .5}, + offset = {x = 0, y = 0}, + text = "crosshair.png", + scale = { x = 1, y = 1}, + alignment = { x = 0, y = 0 }, + }) + minetest.after(0, setflags, player) + +end) \ No newline at end of file