Countdown timer?
#3

I ask this question 1 time now i'll teach you

pawn Код:
#include <a_samp>
#include <zcmd>
#include <sscanf2>

new countac,
    countam,
    counttime;

forward Count();

CMD:count(playerid,params[])
{
    new am;
    if(sscanf(params,"i",am)) return SendClientMessage(playerid,-1,"USAGE: /count [second]");
    counttime = SetTimer("Count",2000,true);
    countam = am;
    countac = 1;
    return 1;
}

public Count()
{
    if(!countac)
    {
        KillTimer(counttime);
    }
    else
    {
        new tstring[128];
        format(tstring,sizeof(tstring),"Counting Down: %i",countam);
        GameTextForAll(tstring,1000,3);
        countam --;
        if(countam == 0)
        {
            countac = 0;
            GameTextForAll("~g~~h~Go!",1000,3);
        }
    }
    return 1;
}
Reply


Messages In This Thread
Countdown timer? - by RALL0 - 17.08.2013, 01:38
Re: Countdown timer? - by Naruto_Emilio - 17.08.2013, 01:45
Re: Countdown timer? - by xganyx - 17.08.2013, 02:53

Forum Jump:


Users browsing this thread: 1 Guest(s)