SA-MP Forums Archive
How To make a gametextforall countdown? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: How To make a gametextforall countdown? (/showthread.php?tid=167769)



How To make a gametextforall countdown? - lSCARl - 13.08.2010

how do i make a countdown on gametextforall?


Re: How To make a gametextforall countdown? - Claude - 13.08.2010

pawn Код:
new count;

if(strcmp("/count", cmdtext, 6) == 0)
{
    count = SetTimer("Count", 1000, false);
    SendClientMessageToAll(COLOR_GREEN,"Countdown started");
    return 1;
}

forward Count();
public Count()
{
    new counter = 3, string[10];
    counter--;
    format(string, sizeof(string),"~g~%d", counter);
    GameTextForAll(1000, 3);
    if(counter == 0)
    {
        GameTextForAll(3000, 3, "~g~Gooooo!!!");
        KillTimer(count);
    }
    return 1;
}