14.03.2012, 09:33
Hi Reklez,
I see a few issues, the first one being this line:
The "Countdown" function expects a "playerid" parameter. However none is passed when using this timer. May I suggest adapting your countdown functions to the following:
That may solve your issues.
Cheers,
TJ
I see a few issues, the first one being this line:
pawn Код:
SetTimer("Countdown", 1000, false);
pawn Код:
public Countdown()
{
for(new playerid = 0; playerid < MAX_PLAYERS; playerid ++)
{
if(IsPlayerConnected(playerid))
{
if(Player[playerid] == 1)
{
GameTextForAll("~r~5",1000,6);
PlayerPlaySound(playerid, 1056, 0, 0, 0);
SetTimer("Countdown2",1000,false);
}
}
}
return 1;
}
public Countdown2()
{
for(new playerid = 0; playerid < MAX_PLAYERS; playerid ++)
{
if(IsPlayerConnected(playerid))
{
if(Player[playerid] == 1)
{
GameTextForAll("~r~4",1000,6);
PlayerPlaySound(playerid, 1056, 0, 0, 0);
SetTimer("Countdown3",1000,false);
}
}
}
return 1;
}
public Countdown3()
{
for(new playerid = 0; playerid < MAX_PLAYERS; playerid ++)
{
if(IsPlayerConnected(playerid))
{
if(Player[playerid] == 1)
{
GameTextForAll("~r~3",1000,6);
PlayerPlaySound(playerid, 1056, 0, 0, 0);
SetTimer("Countdown4",1000,false);
}
}
}
return 1;
}
public Countdown4()
{
for(new playerid = 0; playerid < MAX_PLAYERS; playerid ++)
{
if(IsPlayerConnected(playerid))
{
if(Player[playerid] == 1)
{
GameTextForAll("~r~2",1000,6);
PlayerPlaySound(playerid, 1056, 0, 0, 0);
SetTimer("Countdown5",1000,false);
}
}
}
return 1;
}
public Countdown5()
{
for(new playerid = 0; playerid < MAX_PLAYERS; playerid ++)
{
if(IsPlayerConnected(playerid))
{
if(Player[playerid] == 1)
{
GameTextForAll("~r~1",1000,6);
PlayerPlaySound(playerid, 1056, 0, 0, 0);
SetTimer("CountdownGO",1000,false);
}
}
}
return 1;
}
public CountdownGO()
{
for(new playerid = 0; playerid < MAX_PLAYERS; playerid ++)
{
if(IsPlayerConnected(playerid))
{
if(Player[playerid] == 1)
{
GameTextForAll("~r~GO ~y~GO ~g~GO!!",1000,6);
PlayerPlaySound(playerid, 1056, 0, 0, 0);
Player[playerid] = 0;
}
}
}
return 1;
}
Cheers,
TJ