Timer for command???
#2

Top
pawn Code:
new usedcommand[MAX_PLAYERS];
OnConnect..
pawn Code:
usedcommand[playerid] =0;

OnDisConnect..
pawn Code:
usedcommand[playerid] =0;

InYourCommand..
pawn Code:
usedcommand[playerid] =10; // 10 seconds?

InYourCommand..
pawn Code:
if(usedcommand[playerid]) return SendClientMessage(playerid,COLOR,"Plz Wait");

GameModeInit..
pawn Code:
SetTimer("loltimer",1000,1);

EndOfScript..
pawn Code:
public loltimer()
{
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(usedcommand[i] > 0)
        {
            usedcommand[i] --;
        }
    }
}
Reply


Messages In This Thread
Timer for command??? - by <Weponz> - 25.10.2010, 13:55
Re: Timer for command??? - by BMUK - 25.10.2010, 14:09
Re: Timer for command??? - by <Weponz> - 25.10.2010, 14:27
Re: Timer for command??? - by SampStunta - 25.10.2010, 14:30
Re: Timer for command??? - by sampVaz - 06.11.2010, 03:12
Re: Timer for command??? - by ViruZZzZ_ChiLLL - 06.11.2010, 03:31
Re: Timer for command??? - by <Weponz> - 06.11.2010, 07:54
Re: Timer for command??? - by Mean - 06.11.2010, 08:21

Forum Jump:


Users browsing this thread: 1 Guest(s)