Hi, i really hope about help with this...
I write minigame, but i dont know how to teleport "marked" player's to arena.
I added player to variable for loop, but one player's teleported to arena, but 2nd player no.
Thanks for help and sorry for my english.
I write minigame, but i dont know how to teleport "marked" player's to arena.
I added player to variable for loop, but one player's teleported to arena, but 2nd player no.
Thanks for help and sorry for my english.
Code:
if arg-1 is "joindebug":
if arg-2 is set:
set {gkmplayers.%arg 2%} to 0
send "&6Developer: &7Variable &e{gkmplayers.%arg 2%} &7debugged."
if arg-1 is "join":
if arg-2 is set:
if {arena.%arg 2%} exists:
if {arenatoggle.%arg 2%} is true:
if {gkmplayers.%arg 2%} is less than 2:
add 1 to {gkmplayers.%arg 2%}
set {gkmstart.%arg 2%} to true
teleport player to {waitlobby}
broadcast "{@prefix} Player &c%player% &7joined to arena &9%arg 2% &7(&6%{gkmplayers.%arg 2%}%&7/&6%{gkmmax.%arg 2%}%&7)"
if {gkmplayers.%arg 2%} is bigger than 1:
set {gkmtime.%arg 2%} to 5
add player to {_player::*}
add {_player::*} to {gkmloop.%arg 2%}
if {gkmtime.%arg 2%} is 5:
set action bar of player to "&7&lArena starts in &4&l5 &7&lseconds"
wait 1 seconds
set action bar of player to "&7&lArena starts in &4&l4 &7&lseconds"
wait 1 seconds
set action bar of player to "&7&lArena starts in &4&l3 &7&lseconds"
wait 1 seconds
set action bar of player to "&7&lArena starts in &4&l2 &7&lseconds"
wait 1 seconds
set action bar of player to "&7&lArena starts in &4&l1 &7&lseconds"
wait 1 seconds
set action bar of player to "&7&lArena starting..."
if {gkmloop.%arg 2%} is set:
loop all players:
if loop-player is {_player::*}:
chance of 100%:
execute loop-player command "/gkmarena test testte 1"
chance of 100%:
execute loop-player command "/gkmarena test testte 2"
else:
send "&cNot works"
else:
send "bugged"
else:
stop
else:
stop
else:
send "{@prefix} &cSorry, but arena is full"
else:
send "{@prefix} Arena &c%arg 2% &7is off"
else:
send "{@prefix} &cThis arena doesn't exist"
else:
send "{@prefix} &cBad use: &7/gkm join <arena_name>, Available arenas: /gkm list"