Start count
#3

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

#define COLOR_LIGHTBLUE -1

new string[128];
new countdown;
new TimerCount;

CMD:count(playerid, params[])
{
    new
        pName[30]
    ;
   
    if (countdown != 0)
        return SendClientMessage(playerid, 0xFF9900AA, "Its allready started!");

    countdown = 3;
   
    GetPlayerName(playerid, pName, 30);
    format(string, 280, "*** %s started count.", pName);
    SendClientMessageToAll(COLOR_LIGHTBLUE, string);
   
    GameTextForAll("~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~g~-~y~ 3 ~g~-",1000,3);

    TimerCount = SetTimer("Count2", 1000, true);
    return 1;
}

forward Count2();
public Count2()
{
    countdown--;
   
    if(countdown != 0)
        format(string, sizeof string, "~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~g~-~y~ %d ~g~-", countdown);
    else
        string = "~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~g~-~y~]~g~-~g~START~g~-~y~]~g~-";
    GameTextForAll(string,1000,3);
   
    if(countdown <= 0)
    {
        KillTimer(TimerCount);
        countdown = 0;
    }
    return 1;
}
Reply


Messages In This Thread
Start count - by Speed - 31.10.2011, 19:46
Re: Start count - by boyan96 - 31.10.2011, 19:53
Re: Start count - by TomTroX - 31.10.2011, 20:13
Re: Start count - by Speed - 31.10.2011, 22:30

Forum Jump:


Users browsing this thread: 1 Guest(s)