Hey guys,
I got a team arena like system with this code for each team:
Blue:
Red:
Well then i got this Ready system:
Which works, but the thing is: it only works with one player on each side.
If there are 2 people on the blue team, nothing happens when i click on that ready sign.
Also everything which uses if "%player%" contains "%{sandbox::team::red::*}%":
is not working with 2 people on one side. Is there a way to fix this?
I got a team arena like system with this code for each team:
Blue:
code_language.skript:
on rightclick on sign:
line 2 of the clicked block is "Sandbox":
line 3 of the clicked block is "&1Blue":
if {sandbox.game.started} = 0: #notstarted
set {%player%.game} to 1 #sandbox
add player to {sandbox::team::blue::*} #blue
add 1 to {sandbox.players}
execute console command "warp test1 %player%"
send "&1%player% &bjoined the game!" to {sandbox::team::blue::*} and {sandbox::team::red::*}
else:
message "&bGame has already started!"
Red:
code_language.skript:
on rightclick on sign:
line 2 of the clicked block is "Sandbox":
line 3 of the clicked block is "&4Red":
if {sandbox.game.started} = 0:
set {%player%.game} to 1 #sandbox
add player to {sandbox::team::red::*} #red
add 1 to {sandbox.players}
execute console command "warp test2 %player%"
send "&4%player% &bjoined the game!" to {sandbox::team::blue::*} and {sandbox::team::red::*}
else:
message "&bGame has already started!"
Well then i got this Ready system:
code_language.skript:
on rightclick on sign:
line 2 of the clicked block is "Sandbox":
line 3 of the clicked block is "&a&lReady":
if {sandbox.game.started} = 0: #not started
if {sandbox.countdown} is false:
if "%player%" contains "%{sandbox::team::blue::*}%":
if {%player%.ready} = 0:
send "&1%player% &bis ready!" to {sandbox::team::blue::*} and {sandbox::team::red::*}
add 1 to {sandbox.ready}
set {%player%.ready} to 1
else:
message "&bYou are already ready!"
loop 1 times:
if {sandbox.players} > 1:
if {sandbox.ready} - {sandbox.players} = 0:
execute console command "startsandbox"
exit loop
else:
message "&bYou are alone in the arena!"
exit loop
else if "%player%" contains "%{sandbox::team::red::*}%":
if {%player%.ready} = 0:
send "&4%player% &bis ready!" to {sandbox::team::blue::*} and {sandbox::team::red::*}
add 1 to {sandbox.ready}
set {%player%.ready} to 1
else:
message "&bYou are already ready!"
loop 1 times:
if {sandbox.players} > 1:
if {sandbox.ready} - {sandbox.players} = 0:
execute console command "startsandbox"
exit loop
else:
message "&bYou are alone in the arena!"
exit loop
else:
message "&bThe countdown is already started!"
Which works, but the thing is: it only works with one player on each side.
If there are 2 people on the blue team, nothing happens when i click on that ready sign.
Also everything which uses if "%player%" contains "%{sandbox::team::red::*}%":
is not working with 2 people on one side. Is there a way to fix this?