public BeginRace()
{
if(setracestart == 1)
{
for(new i = 0; i < GetMaxPlayers(); i++)
{
if(playerinrace[i] == 1 && rcount == 0)
{
GameTextForPlayer(i,"~w~Get ready!",1000,4);
PlayerPlaySound(i, 1052, 0, 0, 0);
print("RACE: 4");
format(str, sizeof(str), "~p~Get ready to race!");
TextDrawSetString(BarTD[i], str);
}
if(playerinrace[i] == 1 && rcount == 1)
{
GameTextForPlayer(i,"~g~3",1000,3);
PlayerPlaySound(i, 1053, 0, 0, 0);
print("RACE: 3");
format(str, sizeof(str), "~p~3");
TextDrawSetString(BarTD[i], str);
}
if(playerinrace[i] == 1 && rcount == 2)
{
GameTextForPlayer(i,"~g~2",1000,3);
PlayerPlaySound(i, 1053, 0, 0, 0);
print("RACE: 2");
format(str, sizeof(str), "~p~2");
TextDrawSetString(BarTD[i], str);
}
if(playerinrace[i] == 1 && rcount == 3)
{
GameTextForPlayer(i,"~g~1",1000,3);
PlayerPlaySound(i, 1053, 0, 0, 0);
print("RACE: 1");
format(str, sizeof(str), "~p~1");
TextDrawSetString(BarTD[i], str);
}
if(playerinrace[i] == 1 && rcount == 4)
{
GameTextForPlayer(i,"~r~Let's roll!", 2000, 3);
PlayerPlaySound(i, 1085, 0, 0, 0);
TogglePlayerControllable(i, 1);
SetPlayerCheckpoint(i, checkpoints[0][0], checkpoints[0][1], checkpoints[0][2], 8);
format(str, sizeof(str), "~r~Go, Go, Go!");
TextDrawSetString(BarTD[i], str);
SecondTimer[i] = SetTimerEx("CountSeconds", 910, true, "i", i);
UpdateTimer[i] = SetTimerEx("UpdateTD", 910, true, "i", i);
print("RACE: started");
raceon = 1;
}
}
rcount = rcount + 1;
}
return 1;
}
//for loop { if(IsPlayerConnevted(i) && playerinrace[i] == 1){ switch(rcount){ case 0:{ //bla } case 1:{ //bla } case 2:{ //bla } case 3:{ //bla } case 4:{ //bla } } } rcount++;
Originally Posted by (:
doesnt that do it randomly? instead of 5 4 3 2 1 its in random order 3 2 1 4 5 or smth
|