Skip to content

Instantly share code, notes, and snippets.

@PilzAdam
Created September 16, 2012 19:08
Show Gist options
  • Save PilzAdam/3733872 to your computer and use it in GitHub Desktop.
Save PilzAdam/3733872 to your computer and use it in GitHub Desktop.
minetest.register_chatcommand("afk", {
params = "",
description = "Teleport to the spawn point",
privs = {},
func = function(name, param)
position = minetest.env:get_player_by_name(name):getpos()
minetest.chat_send_player(name, name.." IS NOW AFK AT: "..dump(position))
test = function()
print("test")
minetest.after(1, function()
test()
end)
end
test()
end
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment