30.08.2009, 20:20
I created drag filterscript. When drag starts, countdown shows up for player in drag. But only one of players is unfrozen, and when countdown reaches "0" instead of "GO GO GO" comes up "6" and I don't know why. Here is code:
pawn Код:
forward CountAndStart();
public CountAndStart()
{
count--;
new string[15];
for(new i; i<MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(InRace[i] == true)
{
if(count > 0)
{
format(string, 15, "~y~%d", count);
PlayerPlaySound(i, 1056, 0.0, 0.0, 0.0);
}
else
{
TogglePlayerControllable(i, true);
format(string, 15, "~g~GO GO GO");
PlayerPlaySound(i, 1057, 0.0, 0.0, 0.0);
count = 6;
KillTimer(timer);
}
GameTextForPlayer(i, string, 1000, 3);
}
}
}
}