Double-sending broadcasted message

  • 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 community!

    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.
Jan 9, 2022
8
0
1
I use this to see if a match has ended, but it double sends with one of them saying <none> instead of a name. If this way isn't as efficient as other ways, tell me, but this is the code.


Code:
every 1 second:
    {gameStarted} = true:
        size of {in-game::*} != size of {taggers::*}:
            if {game} > 0:
                subtract 1 from {game}
                wait 1 second
            else if {game} = 0:
                remove {taggers::*} from {in-game::*}
                loop {in-game::*}:
                    add 1 to {winsR.%loop-value%}
                    add 200 to {winsR.%loop-value%}
                    teleport loop-value to location(210.5, 5, 209.5)
                broadcast "&7[&c&lServer&7] >>&f The runners have won!"
                execute console command "game off tp"
                stop
                
        if size of {in-game::*} = size of {taggers::*}:
            size of {taggers::*} > 1:
                broadcast "&7[&c&lServer&7] >>&f The taggers %{taggers::*}% have won!" ##this is what double sends
 
Status
Not open for further replies.