29.07.2012, 06:09
Hi 
I create a public for timer, like this
But I get the error Undefined Symbol "playerid", how to fix it? Because if i directly add the playerid in ReadyToGo(playerid), it's not working. Thanks

I create a public for timer, like this
pawn Код:
forward ReadyToGo();
public ReadyToGo()
{
new string[128];
if(GetPVarInt(playerid, "phase1") == 1)
{
SendClientMessage(playerid,-1, "Get Ready!");
SetPVarInt(playerid, "phase1", 0);
}
if(GetPVarInt(playerid, "phase1") == 0)
{
for(new i=3; i>0; i--)
{
format(string, sizeof(string), "%d!", i);
SendClientMessage(playerid, -1, string);
if(i==1)
{
SetPVarInt(playerid, "phase2", 0);
}
return 1;
}
}
if(GetPVarInt(playerid, "phase2") == 0)
{
SendClientMessage(playerid, -1, "GO!");
TogglePlayerControllable(playerid, 1);
SetTimer("TheTime", 10, 1);
}
return 1;
}
