code_language.skript:
command /spec:
trigger:
loop all players:
if {spec::%loop-player%} is true:
add 1 to {_players}
set {_rows} to {_players}/9
{_rows} is less than 1:
set {_rows} to 1
{_rows} is more than 6:
set {_rows} to 6
open chest with {_rows} rows named "&8&lPLAYERS ALIVE" to player
wait 1 tick
set {_slot} to -1
loop all players:
if {spec::%loop-player%} is true:
add 1 to {_slot}
if loop-player don't have 1 compass:
format slot {_slot} of player with loop-player's skull named "&e● &c&l%loop-player% &e●" with lore "||&e&l&m-----------------||||&9➤ &c&lClick to Teleport ||||&e&l&m-----------------||||" to close then run [run player command "tp %loop-player%" as op]
on join:
set {spec::%player%} to true
on quit:
delete {spec::%player%}
The problem is when i click on skull is teleporting to miself or wrong person