21.02.2009, 20:13
I dunno maybe this?
just a quick draft, not good with timers.
pawn Code:
forward CommandTimer(playerid);
pawn Code:
new commandused[MAX_PLAYERS];
new timer[MAX_PLAYERS];
pawn Code:
if(strcmp(cmdtext,"/count",true) == 0) {
new pName[30];
new string[458];
timer[playerid] = SetTimerEx("command", time,playerid);
commandused[playerid] = 1;
GetPlayerName(playerid, pName, 30);
format(string, 280, "*** %s started count.", pName);
SendClientMessageToAll(COLOR_LIGHTBLUE, string);
GameTextForAll("~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~g~-~y~ 3 ~g~-",1000,3);
for(new i; i < MAX_PLAYERS; i++) {
GetPlayerPos(i,X,Y,Z);
}
SetTimer("count2",1000,0);
SetTimer("count1",2000,0);
SetTimer("countgo",3000,0);
return 1;
}
return 0;
}
pawn Code:
public CommandTimer(playerid)
{
commandused[playerid] = 0;
}