Solved Why does it only teleport 1 player to me?

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

Adrihun

Member
Feb 1, 2017
368
6
0
code_language.skript:
                    if arg-1 is "all":
                        if player has permission "tag.owner":
                            loop all players:
                                loop-player isn't player
                                teleport loop-player to player
                                send "&9Teleport> &7All players have been teleported to &e%player%." to loop-player
                                stop
                        else:
                            send "&9Permissions> &7This requires Permission Rank [&9OWNER&7]."
                            stop
 
What do you mean? If you're asking how many players it will loop its just %amount of players online% (I think that's the expression or something similar just check the docs)
 
I said the expression is something like that check the docs
[doublepost=1496245413,1496245348][/doublepost]%amount of all players%
 
code_language.skript:
                    if arg-1 is "all":
                        if player has permission "tag.owner":
                            loop all players:
                                loop-player isn't player
                                teleport loop-player to player
                                send "&9Teleport> &7All players have been teleported to &e%player%." to loop-player
                                send "%amount of all players-1%" to player
                        else:
                            send "&9Permissions> &7This requires Permission Rank [&9OWNER&7]."
                            stop
Why does it say it twice?
 
If you want it sent to the person who ran the command do it before or after the loop
[doublepost=1496245877,1496245847][/doublepost]Not inside it
 
  • Like
Reactions: Adrihun
Try this one:

code_language.skript:
                    if arg-1 is "all":
                        if player has permission "tag.owner":
                                wait 1 tick
                                teleport all players to player
                                wait 3 ticks
                                send "&9Teleport> &7All players have been teleported to &e%player%." to loop-player
                                stop
                        else:
                            send "&9Permissions> &7This requires Permission Rank [&9OWNER&7]."
                            stop trigger
 
Status
Not open for further replies.