Доступ к архиву

Переход в группу "Пользователь"

300.00 ₽
Одноразовый платёж
Быстрый переход в группу "Пользователи", без надобности написания постов и ожидания.

Покупка дает возможность:
Быть полноправным участником форума
Нормальное копирование кода
Создавать темы
Скачивать файлы
Доступ к архиву Pawno-Info

/time

Статус
В этой теме нельзя размещать новые ответы.

Carleone

Умник
Здравствуйте уважаемые форумчане я представляю вам команду /time на русском языке.
в public OnPlayerCommandText(playerid, cmdtext[])
PHP:
else if(strcmp(cmd, "/time", true) == 0)
        {
        if(IsPlayerConnected(playerid))
        {
            if(GetPlayerState(playerid) == PLAYER_STATE_ONFOOT) ApplyAnimation(playerid, "COP_AMBIENT", "Coplook_watch",4.1,0,0,0,0,0);
            GetPlayerName(playerid, sendername, sizeof(sendername));
            format(string, sizeof(string), "%s взглянул на часы", sendername);
            ProxDetector(25.0, playerid, string, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
            new mtext[32];
            new year, month,day;
            getdate(year, month, day);
            if(month == 1) { mtext = "•®ўap©"; }  
        else if(month == 2) { mtext = "Ѓeўpaћ©"; }  
        else if(month == 3) { mtext = "Map¦"; }  
        else if(month == 4) { mtext = "AЈpeћ©"; }  
        else if(month == 5) { mtext = "Maќ"; }  
        else if(month == 6) { mtext = "…«®©"; }  
        else if(month == 7) { mtext = "…«ћ©"; }  
        else if(month == 8) { mtext = "Aў™yc¦"; }  
        else if(month == 9) { mtext = "Ce®¦¬—p©"; }  
        else if(month == 10) { mtext = "ok¦¬—p©"; }  
        else if(month == 11) { mtext = "Ho¬—p©"; }  
        else if(month == 12) { mtext = "ѓeka—p©"; }  
        new hour,minuite,second;  
        gettime(hour,minuite,second);  
        FixHour(hour);  
        hour = shifthour;  
        if (minuite < 10)  
        {  
            if (PlayerInfo[playerid][pJailTime] > 0)  format(string, sizeof(string), "~y~%d %s~n~~g~~w~%d:0%d~n~~w~Cpok: %d cek", day, mtext, hour, minuite, PlayerInfo[playerid][pJailTime]-10);  
            else format(string, sizeof(string), "~y~%d %s~n~~g~~w~%d:0%d", day, mtext, hour, minuite);  
        }  
        else  
        {  
            if (PlayerInfo[playerid][pJailTime] > 0) format(string, sizeof(string), "~y~%d %s~n~~g~~w~%d:%d~n~~w~Cpok: %d cek", day, mtext, hour, minuite, PlayerInfo[playerid][pJailTime]-10);  
            else format(string, sizeof(string), "~y~%d %s~n~~g~~w~%d:%d", day, mtext, hour, minuite);  
        }  
        GameTextForPlayer(playerid, string, 5000, 1);  
        return true;  
    }
Я себе переделал команду.
PHP:
else if(strcmp(cmd, "/time", true) == 0)
        {
        if(IsPlayerConnected(playerid))
        {
            if(GetPlayerState(playerid) == PLAYER_STATE_ONFOOT) ApplyAnimation(playerid, "COP_AMBIENT", "Coplook_watch",4.1,0,0,0,0,0);
            GetPlayerName(playerid, sendername, sizeof(sendername));
            format(string, sizeof(string), "%s взглянул на часы", sendername);
            ProxDetector(25.0, playerid, string, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
            new mtext[32];
            new year, month,day;
            getdate(year, month, day);
            if(month == 1) { mtext = "•®ўap©"; }
            else if(month == 2) { mtext = "Ѓeўpaћ©"; }
            else if(month == 3) { mtext = "Map¦"; }
            else if(month == 4) { mtext = "AЈpeћ©"; }
            else if(month == 5) { mtext = "Maќ"; }
            else if(month == 6) { mtext = "…«®©"; }
            else if(month == 7) { mtext = "…«ћ©"; }
            else if(month == 8) { mtext = "Aў™yc¦"; }
            else if(month == 9) { mtext = "Ce®¦¬—p©"; }
            else if(month == 10) { mtext = "ok¦¬—p©"; }
            else if(month == 11) { mtext = "Ho¬—p©"; }
            else if(month == 12) { mtext = "ѓeka—p©"; }
            new hour, minuite, second;
            gettime(hour, minuite, second);
            FixHour(hour);
            hour = shifthour;
			if(minuite < 10) format(string, sizeof(string), "~y~%d %s~n~~g~~w~%d:0%d~n~~g~Everest-Rp", day, mtext, hour, minuite);
            else format(string, sizeof(string), "~y~%d %s~n~~g~~w~%d:%d~n~~g~Everest-~g~R~g~p", day, mtext, hour, minuite);
            GameTextForPlayer(playerid, string, 5000, 1);
        }
        return true;
        }
Автор: Members
Думаю я заслужил +сик.
 
Последнее редактирование:
Статус
В этой теме нельзя размещать новые ответы.
Сверху Снизу