3 minetest
.register_privilege("vanish", "Allow to use /vanish command")
5 minetest
.register_chatcommand("vanish", {
7 description
= "Make user invisible at eye of all",
8 privs
= {vanish
= true},
9 func
= function(name
, param
)
11 vanished_players
[name
] = not vanished_players
[name
]
13 if vanished_players
[name
] then
14 prop
= {visual_size
= {x
=0, y
=0}, collisionbox
= {0,0,0,0,0,0}}
16 -- default player size
17 prop
= {visual_size
= {x
=1, y
=1},
18 collisionbox
= {-0.35, -1, -0.35, 0.35, 1, 0.35}}
21 minetest
.get_player_by_name(name
):set_properties(prop
)