#skip player from list

1 messages · Page 1 of 1 (latest)

umbral veldt
#

The map is a big cube with more litthe cubes inside. How do I prevent a player that is within the little cubes from being added to the list, while keeping the other players that are in the big cube only?

            if loop-player is within {_loc1} and {_loc2}:
                if region at loop-player is "mina_costarica":
                    execute console command "bounty"
                    stop
                else:
                    add loop-player to {players::*}
        set {randomplayer} to random element of {players::*}
#

Also tried this, did not work. Player within the litthe cube or region is still being added to the list

            if loop-player is within {_loc1} and {_loc2}:
                if region at loop-player is not "mina_costarica":
                    add loop-player to {players::*}
        set {randomplayer} to random element of {players::*}
#

This is the full command, if needed

    trigger:
        execute console command "bounty_timer"
        wait 1 tick
        wait 1 tick
        set {_loc1} to location(1654, 180, -145)
        set {_loc2} to location(1958, -41, 210)
        execute console command "kit default %{randomplayer}%"
        clear {randomplayer}
        clear {players::*}
        wait 1 tick

        loop all players:
            if loop-player is within {_loc1} and {_loc2}:
                if region at loop-player is not "mina_costarica":
                    add loop-player to {players::*}
                else:
                    execute console command "bounty"
                    stop
        set {randomplayer} to random element of {players::*}

        send "&6⭐ &e&l&oBounty &8» &fJugador &6&l%{randomplayer}% &fmarcado como &c&lobjetivo&f! &fMatenlo para conseguir &erecompensas!" to all players
        execute console command "kit objetivo %{randomplayer}%"```
swift inlet
#

the stop stops all code.

#

you would want to continue.

#

but, you can also just random element of (all players where [input's location is not between a and b]