That's an ugly loop.
PHP Code:
public EndVote()
{
new best = 0;
for(new i = 1; i < sizeof(gVotes); i++)
{
if(gVotes[i] > gVotes[best])
best = i;
}
if(best == 4)
{
client_print(0, print_chat, "%s The current map will be extended for this match. Match will start in 10 seconds.", PREFIX);
set_task(10.0, "StartMatch");
}
else
{
client_print(0, print_chat, "%s The map will be changed within 10 seconds. The map that was chosen is: %s.", PREFIX, mapschosen[best]);
changemapto = best;
set_task(10.0, "ChangeMap");
}
}
Anyway, those "continue" statements are causing an infinite loop (server crash) and should be "break".
__________________