Little help
#3

pawn Код:
new
    CountTimer,
    CountState;

if (strcmp(cmdtext, "/count", true) == 0)
{
    if (CountState != 0)
    {
        return SendClientMessage(playerid, 0xFFFFFFFF, "{FF0000}KLAIDA{FFFFFF}: Skaiиiavimas jau pradлtas");
    }
    CountTimer = SetTimer("StartCD", 1000, true);
    CountState = 3;
    return true;
}

forward StartCD();
public  StartCD()
{
    for (new i; i < MAX_PLAYERS; i++)
    {
        if (!IsPlayerConnected(i)) continue;
        if (count[i]) continue;
        if (CountState > 0)
        {
            new szResult[40];
            format(szResult, 40, "~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~r~%d", CountState - 1);
            GameTextForAll(szResult, 1000, 5);
            PlayerPlaySound(i, 1056, 0, 0, 0);
            -- CountState;
        }
        else
        {
            GameTextForAll("~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~~g~PIRMYN!", 1000, 5);
            PlayerPlaySound(i, 1057, 0, 0, 0);
            KillTimer(CountTimer);
        }
    }
    return true;
}
ant greito parasiau, gali but klaidu =] jei ka rasyk
Reply


Messages In This Thread
Little help - by ixesas - 29.06.2012, 21:18
Re: Little help - by [A]ndrei - 29.06.2012, 21:22
Re: Little help - by BaubaS - 29.06.2012, 21:29
Re: Little help - by AndreT - 29.06.2012, 21:33

Forum Jump:


Users browsing this thread: 1 Guest(s)