Can you guys help me do something.. So at the end of the timer (around line 30) I want a player to recieve $50 if they're in the region {koth}. But for some reason "loop all players" doesn't work.
Code:
#KoTH Skript
#Made by kluytanium/lkluyt
Variables:
{game} = false
{winner} = false
options:
P: &4&l[KoTH]
on region enter:
if "%event-region%" contains "koth":
if {game} is true:
send "{@P} &c%player% &eis capturing the hill!" to all players
on command "/runkoth":
send "{@P} &eKoTH will begin in &a&l1 &eminute!" to all players
wait 1 second
send "{@P} &eKoTH has begun!" to all players
execute console command "/rg flag spawn pvp allow"
set {game} to true
wait 5 seconds
send "{@P} &a&l30 &eseconds left!" to all players
wait 1 second
send "{@P} &a&l5 &eseconds left!" to all players
wait 5 seconds
set {winner} to true
set {game} to false
loop all players:
if {winner} = true:
if "%region at player%" contains "koth":
send "{@P} &c%event-player% &eis the King of the Hill!" to all players
execute console command "/rg flag spawn pvp deny"
execute console command "/eco give %event-player% 50"
set {winner} to false
else:
send "{@P} &eNobody won :((" to all players
set {winner} to false