Hello good, you see I have the error that when you click on the head of the player, it does not teleport to where it should, but it teleports to a player that is not but that is within that variable, but I I want to see another person but I get the person that I did not want to see, I do not know if I explain, I hope you help me, thanks.
My Full Code:
My Full Code:
Code:
on right click with clock:
if name of event-item is "&9Spectate Players":
if size of {tnttag.playing.%{tnttag.myarena.%player%}%::*} is not 0:
set {tnttag.spectatingplayers} to 0
if {tnttag.players.%{tnttag.myarena.%player%}%} <= 8:
open chest with 1 row named "&f&lTNT&c&lTAG" to player
loop {tnttag.playing.%{tnttag.myarena.%player%}%::*}:
set {_player.%loop-value%} to "%loop-value%" parsed as player
format slot {tnttag.spectatingplayers} of player with ("%loop-value%" parsed as offline player)'s skull named "&9%loop-value%" with lore "||&eClick here for Spectate!" to close then run [make player execute command "/tagtp %{_player.%loop-value%}%"]
add 1 to {tnttag.spectatingplayers}
else:
if {tnttag.players.%{tnttag.myarena.%player%}%} <= 16:
open chest with 2 row named "&f&lTNT&c&lTAG" to player
loop {tnttag.playing.%{tnttag.myarena.%player%}%::*}:
set {_player.%loop-value%} to "%loop-value%" parsed as player
format slot {tnttag.spectatingplayers} of player with ("%loop-value%" parsed as offline player)'s skull named "&9%loop-value%" with lore "||&eClick here for Spectate!" to close then run [make player execute command "/tagtp %{_player.%loop-value%}%"]
add 1 to {tnttag.spectatingplayers}
else:
if {tnttag.players.%{tnttag.myarena.%player%}%} <= 24:
open chest with 3 row named "&f&lTNT&c&lTAG" to player
loop {tnttag.playing.%{tnttag.myarena.%player%}%::*}:
set {_player.%loop-value%} to "%loop-value%" parsed as player
format slot {tnttag.spectatingplayers} of player with ("%loop-value%" parsed as offline player)'s skull named "&9%loop-value%" with lore "||&eClick here for Spectate!" to close then run [make player execute command "/tagtp %{_player.%loop-value%}%"]
add 1 to {tnttag.spectatingplayers}
else:
if {tnttag.players.%{tnttag.myarena.%player%}%} <= 32:
open chest with 4 row named "&f&lTNT&c&lTAG" to player
loop {tnttag.playing.%{tnttag.myarena.%player%}%::*}:
set {_player.%loop-value%} to "%loop-value%" parsed as player
format slot {tnttag.spectatingplayers} of player with ("%loop-value%" parsed as offline player)'s skull named "&9%loop-value%" with lore "||&eClick here for Spectate!" to close then run [make player execute command "/tagtp %{_player.%loop-value%}%"]
add 1 to {tnttag.spectatingplayers}
else:
send "&6&lTNT&c&lTAG&7 ERROR!"
else:
send "&6&lTNT&c&lTAG&7 No players for spect right now!"
command /tagtp [<text>]:
trigger:
if arg 1 is set:
set {tagplayer} to arg-1 parsed as player
teleport player to {tagplayer}