29.07.2012, 06:11
pawn Код:
forward ReadyToGo(playerid);
public ReadyToGo(playerid)
{
new string[128];
if(GetPVarInt(playerid, "phase1") == 1)
{
SendClientMessage(playerid,-1, "Get Ready!");
SetPVarInt(playerid, "phase1", 0);
}
else 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, "phase1") == 0)
{
SendClientMessage(playerid, -1, "GO!");
TogglePlayerControllable(playerid, 1);
SetTimer("TheTime", 10, 1);
}
return 1;
}
pawn Код:
SetTimerEx("ReadyToGo", millisecondshere, looping?, "i", playerid);