Solved Loop all players and tp

  • 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.

Ariuw

Member
Sep 6, 2017
42
1
8
30
Hello.

I've been trying to do a command where if a player is on a team it will execute teams command. But after a lot of messed up code I realized that I don't know how to fix it..

Code:
command /timer [<text>] [<integer>]:
    trigger:
        if arg-1 is "start":
            set {_countdown} to arg 2
            set {countdown} to true
            wait 1 tick
            loop arg 2 times:
                if {countdown} is true:
                    broadcast "&eMatch will start in &c%{_countdown}% &eseconds"
                    remove 1 from {_countdown}
                    wait 1 second
                else:
                    stop
            play sound "NOTE_PLING" to all players with volume 100 and pitch 15
            broadcast ""
            broadcast "&aMatch has started!"
            broadcast ""
            loop all players:
                if {ir::obs::%player%} is set:
                    make loop-players execute command "/armor0"
                if {ir::red::%player%} is set:
                    make loop-players execute command "/armor1"
                if {ir::blue::%player%} is set:
                    make loop-players execute command "/armor2"

It does not TP the team players. (It has to be all players on the team) {ir::team::%player%} is alredy defined and working. I just don't know how to make this work. Please help!
[doublepost=1534885624,1534818927][/doublepost]bump since I need to fix this asap <3
 
use loop-player in your variable, not just player
so:
{ir::team::%loop-player%}
oh ... thank you so much!!!! I can't thank you enough <3 you've done a lot for me!

PS: Have you noticed that we joined the same day to Skunity?
 
Status
Not open for further replies.