Помагите разобраться с кодом

Diego_Drakons

Новичок
Автор темы
8
0
Не понимаю почему код работает но криво помогите написать правильно.
Код:
CMD:stime(playerid)
{
    new string[100];
    if(Login[playerid] == false) return SCM(playerid, COLOR_GREY, "Вы не авторизовались!");
    GetPlayerName(playerid, playername, sizeof(playername));
    if(GetPlayerState(playerid) == PLAYER_STATE_ONFOOT) ApplyAnimation(playerid, "COP_AMBIENT", "coplook_watch", 4.1, 0, 0, 0, 0, 0);
    getdate(year, month, day);
    new text[15];
    switch(month)
    {
        case 1: text = "Январь";
        case 2: text = "Февраль";
        case 3: text = "Март";
        case 4: text = "Апрель";
        case 5: text = "May";
        case 6: text = "Июнь";
        case 7: text = "Июль";
        case 8: text = "Август";
        case 9: text = "Сентябрь";
        case 10: text = "Октябарь";
        case 11: text = "Ноябрь";
        case 12: text = "Декабрь";
    }
    format(string, sizeof(string), "%s взглянул(а) на часы", playername);
    SetPlayerChatBubble(playerid, string, COLOR_PURPLE, 20.0, 5*1000);
    gettime(hour, minuta, second);
    if(minuta < 10) format(string, sizeof(string), "~y~%d %s~n~~g~%d:0%d", day, text, hour, minuta);
    else format(string, sizeof(string), "~y~%d %s~n~~g~%d:%d", day, text, hour, minuta);
    GameTextForPlayer(playerid, string, 5*1000, 1);
    return true;
}
 

Diego_Drakons

Новичок
Автор темы
8
0

syhanovsdd

Известный
21
10
C++:
stock FixText(string[]) 
{ 
new result[256]; 
for (new i=0; i < 256; i++) 
{ 
switch (string[i]) 
{ 
case 'а', 'А': result[i] = 'A'; 
case 'б', 'Б': result[i] = 'Ђ'; 
case 'в', 'В': result[i] = 'B'; 
case 'г', 'Г': result[i] = '‚'; 
case 'д', 'Д': result[i] = 'ѓ'; 
case 'е', 'Е': result[i] = 'E'; 
case 'ё', 'Ё': result[i] = 'E'; 
case 'ж', 'Ж': result[i] = '„'; 
case 'з', 'З': result[i] = '3'; 
case 'и', 'И': result[i] = '…'; 
case 'й', 'Й': result[i] = '†'; 
case 'к', 'К': result[i] = 'K'; 
case 'л', 'Л': result[i] = '‡'; 
case 'м', 'М': result[i] = 'M'; 
case 'н', 'Н': result[i] = 'H'; 
case 'о', 'О': result[i] = 'O'; 
case 'п', 'П': result[i] = 'Њ'; 
case 'р', 'Р': result[i] = 'P'; 
case 'с', 'С': result[i] = 'C'; 
case 'т', 'Т': result[i] = 'T'; 
case 'у', 'У': result[i] = 'Y'; 
case 'ф', 'Ф': result[i] = 'Ѓ'; 
case 'х', 'Х': result[i] = 'X'; 
case 'ц', 'Ц': result[i] = '‰'; 
case 'ч', 'Ч': result[i] = 'Ќ'; 
case 'ш', 'Ш': result[i] = 'Ћ'; 
case 'щ', 'Щ': result[i] = 'Љ'; 
case 'ъ', 'Ъ': result[i] = 'ђ'; 
case 'ы', 'Ы': result[i] = '‘'; 
case 'ь', 'Ь': result[i] = '’'; 
case 'э', 'Э': result[i] = '“'; 
case 'ю', 'Ю': result[i] = '”'; 
case 'я', 'Я': result[i] = '•'; 
default: result[i] = string[i]; 
} 
} 
return result; 
}
 

Diego_Drakons

Новичок
Автор темы
8
0
C++:
stock FixText(string[])
{
new result[256];
for (new i=0; i < 256; i++)
{
switch (string[i])
{
case 'а', 'А': result[i] = 'A';
case 'б', 'Б': result[i] = 'Ђ';
case 'в', 'В': result[i] = 'B';
case 'г', 'Г': result[i] = '‚';
case 'д', 'Д': result[i] = 'ѓ';
case 'е', 'Е': result[i] = 'E';
case 'ё', 'Ё': result[i] = 'E';
case 'ж', 'Ж': result[i] = '„';
case 'з', 'З': result[i] = '3';
case 'и', 'И': result[i] = '…';
case 'й', 'Й': result[i] = '†';
case 'к', 'К': result[i] = 'K';
case 'л', 'Л': result[i] = '‡';
case 'м', 'М': result[i] = 'M';
case 'н', 'Н': result[i] = 'H';
case 'о', 'О': result[i] = 'O';
case 'п', 'П': result[i] = 'Њ';
case 'р', 'Р': result[i] = 'P';
case 'с', 'С': result[i] = 'C';
case 'т', 'Т': result[i] = 'T';
case 'у', 'У': result[i] = 'Y';
case 'ф', 'Ф': result[i] = 'Ѓ';
case 'х', 'Х': result[i] = 'X';
case 'ц', 'Ц': result[i] = '‰';
case 'ч', 'Ч': result[i] = 'Ќ';
case 'ш', 'Ш': result[i] = 'Ћ';
case 'щ', 'Щ': result[i] = 'Љ';
case 'ъ', 'Ъ': result[i] = 'ђ';
case 'ы', 'Ы': result[i] = '‘';
case 'ь', 'Ь': result[i] = '’';
case 'э', 'Э': result[i] = '“';
case 'ю', 'Ю': result[i] = '”';
case 'я', 'Я': result[i] = '•';
default: result[i] = string[i];
}
}
return result;
}
Снимок экрана 2025-07-02 100716.png

с этим кодом тоже самая картина