Форум

  • Страница 1 из 1
  • 1
Модератор форума: AlexPPPP  
Форум | www.SAMP-TEAM.com » Wiki SA-MP » Команды » [C.M.D] /text - писать в чат от другого игрока
[C.M.D] /text - писать в чат от другого игрока
Code
else if(strcmp(cmd, "/t", true) == 0 || strcmp(cmd, "/text", true) == 0)
     {
             if(PlayerInfo[playerid][pAdmin] >= 3)
             {
                 if(gPlayerLogged[playerid] == 0) return    SendClientMessage(playerid, COLOR_GREY, "Вы еще не вошли!");
                 tmp = strtok(cmdtext, idx);
                 if(!strlen(tmp)) return        SendClientMessage(playerid, COLOR_WHITE, "* Используйте: /(t)ext [id] [текст]");
                 giveplayerid = ReturnUser(tmp);
                 if (IsPlayerConnected(giveplayerid))
                 {
                     if(giveplayerid != INVALID_PLAYER_ID)
                     {
                         GetPlayerName(playerid, sendername, sizeof(sendername));
                         GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
                         new length = strlen(cmdtext);
                         while ((idx < length) && (cmdtext[idx] <= ' '))
                         {
                             idx++;
                         }
                         new offset = idx;
                         new result[64];
                         while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
                         {
                             result[idx - offset] = cmdtext[idx];
                             idx++;
                         }
                         result[idx - offset] = EOS;
                         if(!strlen(result)) return    SendClientMessage(playerid, COLOR_GRAD2, "* Используйте: /text [id] [текст]");
                         if (PlayerInfo[playerid][pAdmin] >= 1)
                         {
                           ApplyAnimation(giveplayerid,"PED","IDLE_CHAT",4.1,0,1,1,1,1,1);
                         clearanim[giveplayerid] = 7;
                           format(string, sizeof(string), "- %s: %s",giveplayer,(result));
                           SetPlayerChatBubble(giveplayerid, (result), 0x6495EDFF, 20.0, 10000);
                         ProxDetector(20.0, giveplayerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
                           }
                     }
                 }
                 else
                 {
                     SendClientMessage(playerid, COLOR_GREY, "[Ошибка] Человек не найден!");
                 }
             }
             else
             {
                 SendClientMessage(playerid, COLOR_GREY, "Вы не уполномочены использовать эту команду!");
                 return 1;
             }
         return 1;
     }
02.10.2012 в 16:27
эт ток админы могут?
05.06.2013 в 22:33
Форум | www.SAMP-TEAM.com » Wiki SA-MP » Команды » [C.M.D] /text - писать в чат от другого игрока
  • Страница 1 из 1
  • 1
Поиск: