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

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

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

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

Помогите исправить чат!

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

romavrn

Умник
Чат.
1. Када пишешь самому себе #0 Привет все норм получаеться

Когда пишешь другому человеку допустим Richerd_Druw , выходит вот так (#1 привет) в чате Richerd_Druw[1] : Richerd_Druw привет

А должно быть ExtaZ[0] : Richerd_Druw привет

2. Почему при заходе на сервер у всех черный ник а не как в TAB ?

Вот код помогите исправить!

PHP:
//==============================================================================
        if(strlen(text)> 60)
        {
            SendClientMessage(playerid,-1,"Текст Слишком Большой! Максимальный размер текста: 60.");
            return 0;
        }

        SetPlayerChatBubble(playerid, text, 0x21DD00FF, 250.0, 8000); // Чат над головой
        new PlayerName[MAX_PLAYER_NAME+16];
        GetPlayerName(playerid, PlayerName, MAX_PLAYER_NAME);
        //new string[144];
        strins(string, text, 0);
        for(new i = strfind(string, "#", true), a = 0, tmp[3]; i != -1; i = strfind(string, "#", true, i))
        {
            ++i, a = 0;
            while((text[i] >= 48 && text[i] <= 57) && a < 3)
            {
                tmp[a++] = text[i++];
            }
            strdel(string, i - a - 1, i);
            if(tmp[0] == EOS || !IsPlayerConnected(strval(tmp[0])))
            {
                strins(string, "ID***", i - a - 1);
            }
            else
            {
                GetPlayerName(strval(tmp), PlayerName, MAX_PLAYER_NAME);
                switch(TextsActive[playerid])
                {
                    case 0: format(PlayerName,sizeof(PlayerName), "{%06x}%s{FFFFFF}",GetPlayerColor(strval(tmp)) >>> 8, PlayerName);
                    case 1: format(PlayerName,sizeof(PlayerName), "{%06x}%s{FFFF00}",GetPlayerColor(strval(tmp)) >>> 8, PlayerName);
                    case 2: format(PlayerName,sizeof(PlayerName), "{%06x}%s{FF0000}",GetPlayerColor(strval(tmp)) >>> 8, PlayerName);
                    case 3: format(PlayerName,sizeof(PlayerName), "{%06x}%s{00BFFF}",GetPlayerColor(strval(tmp)) >>> 8, PlayerName);
                    case 4: format(PlayerName,sizeof(PlayerName), "{%06x}%s{00FF00}",GetPlayerColor(strval(tmp)) >>> 8, PlayerName);
                    case 5: format(PlayerName,sizeof(PlayerName), "{%06x}%s{696969}",GetPlayerColor(strval(tmp)) >>> 8, PlayerName);
                    case 6: format(PlayerName,sizeof(PlayerName), "{%06x}%s{FF00FF}",GetPlayerColor(strval(tmp)) >>> 8, PlayerName);
                    case 7: format(PlayerName,sizeof(PlayerName), "{%06x}%s{FFFFFF}",GetPlayerColor(strval(tmp)) >>> 8, PlayerName);
                    default: format(PlayerName,sizeof(PlayerName), "{%06x}%s{FFFFFF}",GetPlayerColor(strval(tmp)) >>> 8, PlayerName);
                }
                strins(string, PlayerName, i - a - 1);
            }
        }
        switch(TextsActive[playerid])
        {
            case 0: format(string, sizeof(string), "%s[%d]: {FFFFFF}%s", PlayerName, playerid, string);
            case 1: format(string, sizeof(string), "%s[%d]: {FFFF00}%s", PlayerName, playerid, string);
            case 2: format(string, sizeof(string), "%s[%d]: {FF0000}%s", PlayerName, playerid, string);
            case 3: format(string, sizeof(string), "%s[%d]: {00BFFF}%s", PlayerName, playerid, string);
            case 4: format(string, sizeof(string), "%s[%d]: {00FF00}%s", PlayerName, playerid, string);
            case 5: format(string, sizeof(string), "%s[%d]: {696969}%s", PlayerName, playerid, string);
            case 6: format(string, sizeof(string), "%s[%d]: {FF00FF}%s", PlayerName, playerid, string);
            case 7: format(string, sizeof(string), "%s[%d]: {FFFFFF}%s", PlayerName, playerid, string);
            default: format(string, sizeof(string), "%s[%d]: {FFFFFF}%s", PlayerName, playerid, string);
        }
        SendClientMessageToAll(GetPlayerColor(playerid), string);
    }
 
Статус
В этой теме нельзя размещать новые ответы.
Сверху Снизу