Hello, i have problem with adding player into list variable, then i need this variable call in stop command for my minigame.
Does anyone know how to fix it please?
In join command it works good, but in stop command in loop it doesnt works.
thx for any answer.
Does anyone know how to fix it please?
Code:
if arg-1 is "join":
if arg-2 is set:
if {arena.%arg 2%} exist:
if {muarenatoggle.%arg 2%} is true:
if {mu.join.%player%} is false:
if {muarena.%arg 2%} is set:
if player's gamemode is survival:
if {mu.players.%arg 2%} is less than {@arenasloty}:
if {mustart.arena.%arg 2%} is false:
add 1 to {mu.players.%arg 2%}
add player to {players::*}
broadcast "{@mpx} Hráč &c%sender% &7se připojil do arény &e%arg 2%. &8&l(&9%{mu.players.%arg 2%}%&f/&9{@arenasloty}&8&l)&7, připoj se také /{@mcmd} join &e%arg 2%"
execute console command "/discord bcast {@mpx} Hráč &c%sender% &7se připojil do arény &e%arg 2%. &8&l(&9%{mu.players.%arg 2%}%&f/&9{@arenasloty}&8&l)&7, připoj se také /{@mcmd} join &e%arg 2%"
set {mu.join.%player%} to true
set {mu.gamekills::%player%} to 0
set {muprotect.%player%} to true
set the player's food level to 10
heal the player
set {muhracvar.::*} to player
set the player's gamemode to survival
clear player's inventory
teleport player to {muwaitlobby.%arg 2%}
send "{@header}"
send " "
send " <##2ee600>&lVYBER SI TÝM"
send " "
message "<tooltip:<##00e625>&l» &cBudeš bojovat za Němce><run command:/ww team de><##00e625>&l» &cNěmecko &7&l[&aVYBRAT&7&l]<reset>" to player
send " "
message "<tooltip:<##00e625>&l» &bBudeš bojovat za ČR><run command:/ww team cr><##00e625>&l» &bČeská Republika &7&l[&aVYBRAT&7&l]<reset>" to player
send " "
send "{@header}"
set slot 8 of player's inventory to emerald named "&a&lObchod"
if {mu.respawn.%player%} is 0:
if arg-2 is "test":
set {mu.respawn.%player%} to 1
if arg-2 is "les":
set {mu.respawn.%player%} to 2
if arg-2 is "random":
set {mu.respawn.%player%} to 3
if {mu.players.%arg 2%} = 4:
set {mustart.arena.%arg 2%} to true
execute console command "/ww start %arg-2%"
else:
send "{@mpx} &cHra je již v akci"
else:
send "{@mpx} &cAréna je přeplněná."
else:
send "{@mpx} &cSundej si creative pro připojení!"
else:
send "{@mpx} &cNení nastaven spawn do arény, kontaktuj administrátory."
else:
send "{@mpx} &cJiž jsi připojen ve hře."
else:
send "{@mpx} &cAréna je vypnuta, kontaktuj administrátory."
else:
send "{@mpx} &cAréna s tímto názvem neexistuje."
if arg-1 is "stop":
if arg-2 is set:
if {muarenatoggle.%arg 2%} is true:
if {arena.%arg 2%} exist:
if {muarena.%arg 2%} is set:
if player's gamemode is survival:
if player has permission "ww.admin":
if {mustart.arena.%arg 2%} is true:
broadcast "{@mpx} Aréna &e%arg 2% &7byla manualně ukončena."
execute console command "/discord bcast {@mpx} Aréna &e%arg 2% &7byla manualně ukončena."
execute console command "/topww top3"
set {mustart.arena.%arg 2%} to false
set {mu.players.%arg 2%} to 0
set {detective.c} to 0
set {murder.c} to 0
set {innocent.c} to 0
set {mustart} to false
loop {players::*}:
execute console command "/team leave %loop-value%"
teleport loop-value to {mulobby}
set loop-value's tablist name to "&f%loop-value%"
set {mu.join.%loop-value%} to false
clear loop-value's inventory
set {de.%loop-value%} to false
set {mu.respawn.%loop-value%} to 0
set {cr.%loop-value%} to false
set {mu.gamekills::%loop-player%} to 0
give 1 nether star named "<##e6008a>Výběr arén" to loop-value's inventory
clear {players::*}
else:
send "{@mpx} &cCeka se na hrace."
else:
send "{@mpx} &cNemáš dostatečné pravomoce."
else:
send "{@mpx} &cSundej si creative."
else:
send "{@mpx} &cNení uložena spawn pozice arény."
else:
send "{@mpx} &cAréna s tímto názvem neexistuje."
else:
send "{@mpx} &cAréna je vypnutá. /ww toggle &a%arg 2%"
In join command it works good, but in stop command in loop it doesnt works.
thx for any answer.