CD Command
#6

CD command:
pawn Код:
if(strcmp(cmd, "/countdown", true) == 0 || strcmp(cmd, "/cd", true) == 0)
    {
        if(IsPlayerAdmin(playerid) || PlayerInfo[playerid][AdminLevel] >= 1)
        {
            new tmp[256], tmp2[256];
            tmp = strtok(cmdtext, idx);
            tmp2 = strtok(cmdtext, idx);
            if(!strlen(tmp))
            {
                SendClientMessage(playerid, COLOUR_ORANGE, "/CountDown [Time] [0/1 - Freeze]");
                return 1;
            }
            if(!strlen(tmp2))
            {
                SendClientMessage(playerid, COLOUR_ORANGE, "/CountDown [Time] [0/1 - Freeze]");
                return 1;
            }
            new timer, number, string[128];
            timer = strval(tmp);
            number = strval(tmp2);
            if(CountDownOn == 1) return SendClientMessage(playerid, COLOUR_RED, "лбш йщ сфйшд фетмъ");
            if(ResServCdOn == 1) return SendClientMessage(playerid, COLOUR_RED, "дсфйшд майфес дщшъ лбш фетмъ");
            if(number > 1 || number < 0) return SendClientMessage(playerid, COLOUR_RED, "оцб ддчфад йлем мдйеъ шч 0/1. 0 - бмй дчфад / 1 - тн дчфад");
            if(timer < 1 || timer > 1000) return SendClientMessage(playerid, COLOUR_RED, "лоеъ дщрйеъ зййбъ мдйеъ бйп 1 - 1000");
            CountDownOn = 1;
            if(number == 0)
            {
                format(string, sizeof(string), "дордм дзм сфйшд щм %d щрйеъ бмй айфес дчфад", timer);
                SendClientMessageToAll(COLOUR_YELLOW, string);
                CountDownTimer = SetTimer("CountDown", timer*1000, 0);
                CountDown(timer, 0);
            }
            else
            {
                format(string, sizeof(string), "дордм дзм сфйшд щм %d щрйеъ тн айфес дчфад");
                SendClientMessageToAll(COLOUR_YELLOW, string);
                CountDownTimer = SetTimer("CountDown", timer*1000, 0);
                CountDown(timer, 1);
                ToggleAllPlayersControllable(0);
            }
        }
        else return SendClientMessage(playerid, COLOUR_RED, "аъд зййб мдйеъ мфзеъ агойп шод 1 бщбйм мдщъощ бфчегд же");
        return 1;
    }
CCD command:
pawn Код:
if(strcmp(cmd, "/cancelcountdown", true) == 0 || strcmp(cmd, "/ccd", true) == 0)
    {
        if(IsPlayerAdmin(playerid) || PlayerInfo[playerid][AdminLevel] >= 1)
        {
            if(CountDownOn == 0) return SendClientMessage(playerid, COLOUR_RED, "айп сфйшд фтймд");
            GameTextForAll("~r~Count Down Canceled", 3000, 3);
            CountDownOn = 0;
            KillTimer(CountDownTimer);
            ToggleAllPlayersControllable(1);
        }
        else return SendClientMessage(playerid, COLOUR_RED, "аъд зййб мдйеъ мфзеъ агойп шод 1 бщбйм мдщъощ бфчегд же");
        return 1;
    }
Reply


Messages In This Thread
CD Command - by omer5198 - 08.08.2011, 11:50
Re: CD Command - by Kingunit - 08.08.2011, 11:56
Re: CD Command - by omer5198 - 08.08.2011, 12:02
Re: CD Command - by Kingunit - 08.08.2011, 12:32
Re: CD Command - by AndreT - 08.08.2011, 13:20
Re: CD Command - by omer5198 - 08.08.2011, 13:46
Re: CD Command - by omer5198 - 08.08.2011, 14:12
Re: CD Command - by omer5198 - 08.08.2011, 17:22
Re: CD Command - by LZLo - 08.08.2011, 18:30

Forum Jump:


Users browsing this thread: 1 Guest(s)