26.04.2010, 15:44
pawn Код:
format(str, sizeof(str), "~y~ ~h~ ]%d]", CoUnTDown);
the whole function is like this:
pawn Код:
public CountdowN()
{
for(new i; i<MAX_PLAYERS; i++)
{
if(InRace[i] == 1)
{
if(CoUnTDown == 0)
{
PlayerPlaySound(i,1057,0,0,0);
GameTextForPlayer(i, "~y~ ~h~]Go ~b~Go ~y~ ~h~Go]", 3000, 3);
RacePos = 0;
SetPlayerRaceCheckpoint(i, 0, RaceI[CurrentRace][X][1], RaceI[CurrentRace][Y][1], RaceI[CurrentRace][Z][1], RaceI[CurrentRace + 1][X][2], RaceI[CurrentRace + 1][Y][2], RaceI[CurrentRace + 1][Z][2], 25);
RaceCPS[i] = 1;
TogglePlayerControllable(i, true);
Time53 = SetTimer("RaceTimer", 1000, true);
}
if(CoUnTDown > 0)
{
new str[10];
format(str, sizeof(str), "~y~ ~h~ ]%d]", CoUnTDown);
GameTextForPlayer(i, str, 900, 3);
PlayerPlaySound(i,1056,0,0,0);
}
}
}
if(CoUnTDown == 0)
{
KillTimer(CDTIME);
}
CoUnTDown --;
return 1;
}