I want to set a privilege to give command to spawn.
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
- Code: Select all
minetest.register_chatcommand("spawn", {
params = "",
description = "Go to spawn",
privs = {},
func = function(name, param)
local player = minetest.env:get_player_by_name(name)
minetest.chat_send_player(name, "Teletransporte to spawn...")
player:setpos({x=0, y=0, z=0})
return true
end,
})