cmd /kill with time
#3

Quote:
Originally Posted by DanishHaq
Посмотреть сообщение
Yes, set a timer... i.e.:

pawn Код:
forward KillCommandTimer(playerid); // at the top
new KillCommand[MAX_PLAYERS]; // still at the top
Below main();

pawn Код:
public KillCommandTimer(playerid)
{
    GameTextForPlayer(playerid, "You can now use /kill again", 3000, 6);
    KillCommand[playerid] = 0;
    return 1;
}
Under the /kill:

pawn Код:
if(KillCommand[playerid] == 1) return SendClientMessage(playerid, 0xFFFFFFFF, "You can only use this command once every 3 minutes.");
SetTimerEx("KillCommandTimer", 180000, false, "i", playerid);
KillCommand[playerid] = 1;
Thanks man You always help me +rep
Reply


Messages In This Thread
cmd /kill with time - by BoU3A - 12.09.2013, 15:05
Re: cmd /kill with time - by DanishHaq - 12.09.2013, 15:10
Re: cmd /kill with time - by BoU3A - 12.09.2013, 15:16

Forum Jump:


Users browsing this thread: 1 Guest(s)