30.06.2009, 06:29
umm do you mean like this?:
pawn Код:
new cmdUsed[MAX_PLAYERS];
OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmdtext, "/command", true)==0)
{
if(cmdUsed[playerid]) return SendClientMessage(playerid, 0xFFFFFFFF, "You must wait 2 minutes before using the cmd again.");
// do the command thing here and...
cmdUsed[playerid] = 1;
SetTimerEx("resetCmd", 120000, 0, "i");
return 0;
}
return 0;
}
public resetCmd(i)
{
cmdUsed[i] = 0;
}