Disabling Commands .. ?
#2

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;
}
Reply


Messages In This Thread
Disabling Commands .. ? - by •Ajax• - 30.06.2009, 06:20
Re: Disabling Commands .. ? - by Ignas1337 - 30.06.2009, 06:29
Re: Disabling Commands .. ? - by •Ajax• - 30.06.2009, 06:49
Re: Disabling Commands .. ? - by Ignas1337 - 30.06.2009, 06:56

Forum Jump:


Users browsing this thread: 2 Guest(s)