kukubaczek

Spawn

May 30th, 2014
264
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. command /setspawn:
  2.     permission: setspawn
  3.     trigger:
  4.         set {spawn} to location of player
  5.         send "Spawn zostal ustawiony!"
  6. command /spawn:
  7.     trigger:
  8.         if {spawn} is set:
  9.             set {_pos} to location of player
  10.             add 5 to {time.%player%}
  11.             loop 5 times:
  12.                 wait 1 real second
  13.                 if {_pos} isn't location of player:
  14.                     send "Poruszyles sie, teleportacja anulowana!"
  15.                     stop trigger
  16.                 remove 1 from {time.%player%}
  17.                 if {time.%player%} is 0:
  18.                     teleport player to {spawn}
  19.                     send "Przeteleportowano na spawn!"
  20. on first join:
  21.     if {spawn} is set:
  22.         teleport player to {spawn}
  23. on respawn:
  24.     if {spawn} is set:
  25.         teleport player to {spawn}
Advertisement
Add Comment
Please, Sign In to add comment