cmd /kill with time
#1

can i do if someone type /kill and try to type it agian after die in same time hes got message like "You can use this cmd after 3:00min"

sorry for my suck english :/
Reply
#2

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


Forum Jump:


Users browsing this thread: 1 Guest(s)