Advertisement
Guest User

Untitled

a guest
Jul 14th, 2014
45
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. minetest.register_chatcommand("goldtouch", {
  2. params = "singleplayer",
  3. func = function (name, param)
  4. local player = minetest.env:get_player_by_name(param)
  5.  
  6. local playerPos = player:getpos()
  7. playerPos.x = math.floor(playerPos.x)
  8. playerPos.y = math.floor(playerPos.y)
  9. playerPos.z = math.floor(playerPos.z)
  10. minetest.set_node(playerPos, {name="default:goldblock"})
  11. end
  12. })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement