Skip to content
Snippets Groups Projects
Commit bac53dc7 authored by NatureFreshMilk's avatar NatureFreshMilk
Browse files

conditional teleport button

parent ee77e0e7
No related branches found
No related tags found
No related merge requests found
......@@ -124,11 +124,18 @@ local function show_formspec(playername, data)
list = list .. ";]"
local teleport_button = ""
-- show teleport button
if minetest.check_player_privs(playername, "teleport") then
teleport_button = "button_exit[4,11;4,1;teleport;Teleport]"
end
local formspec = [[
size[16,12;]
label[0,0;Search results (]] .. #data .. [[)]
button_exit[0,11;4,1;show;Show]
button_exit[4,11;4,1;teleport;Teleport]
]] .. teleport_button .. [[
button_exit[12,11;4,1;exit;Exit]
tablecolumns[color;text;text;text;text]
table[0,1;15.7,10;items;#999,Distance,Owner,Coords,Description]] .. list
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment