Simple Countdown:
pawn Код:
forward StartCount();
forward Count2(playerid);
forward Count3(playerid);
forward Count4(playerid);
forward Count5(playerid);
forward Count6(playerid);
pawn Код:
public StartCount()
{
for(new i=0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i) && IsPlayerInDuelCondition[i])
{
GameTextForPlayer(i, "5", 1000, 3);
SetTimerEx("Count2", 1000, false, "d", i);
}
}
return 1;
}
pawn Код:
public Count2(playerid)
{
GameTextForPlayer(playerid,"4",1000,3);
SetTimerEx("Count3", 1000, false, "d", playerid);
return 1;
}
pawn Код:
public Count3(playerid)
{
GameTextForPlayer(playerid,"3",1000,3);
SetTimerEx("Count4", 1000, false, "d", playerid);
return 1;
}
pawn Код:
public Count4(playerid)
{
GameTextForPlayer(playerid,"2",1000,3);
SetTimerEx("Count5", 1000, false, "d", playerid);
return 1;
}
pawn Код:
public Count5(playerid)
{
GameTextForPlayer(playerid,"1",1000,3);
SetTimerEx("Count6", 1000, false, "d", playerid);
return 1;
}
pawn Код:
public Count6(playerid)
{
GameTextForPlayer(playerid, "GO",1000,3);
return 1;
}
Now you just have to put StartCount(); in the condition when both have accepted =D ^^