SHARE
TWEET

Untitled

a guest Dec 28th, 2015 56 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. minetest.register_chatcommand("spawn", {
  2.     params = "",
  3.     description = "Teleport to the spawn location.",
  4.     privs = {shout=true},
  5.     func = function(name, param)
  6.             local player = minetest.get_player_by_name(name)
  7.             minetest.chat_send_player(name, "Teleported to spawn!")
  8.             player:setpos(minetest.string_to_pos(minetest.setting_get("static_spawnpoint")))
  9.             return true
  10.     end,
  11. })
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top