SA-MP Forums Archive
[AJUDA] /radio e /departamentos - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [AJUDA] /radio e /departamentos (/showthread.php?tid=227649)



[AJUDA] /radio e /departamentos - deregudegu - 17.02.2011

Esses comandos estгo dando bugados, o /radio deixa o chat parar todos as ORGs e nгo sу para a que й do player, e o /departamentos da um flood no chat violento.

/radio
pawn Код:
if(strcmp(cmd, "/radio", true) == 0 || strcmp(cmd, "/r", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            GetPlayerName(playerid, sendername, sizeof(sendername));
            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))
            {
                SendClientMessage(playerid, COLOR_GRAD2, "USO: (/r)adio [radio chat]");
                return 1;
            }
            if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1)//PM radio
              {
                  if(PlayerInfo[playerid][pRank] == 1){format(string, sizeof(string), "Cabo %s: %s, cвmbio.", sendername, result);}
                  else if(PlayerInfo[playerid][pRank] == 2){format(string, sizeof(string), "Sub-Tenente %s: %s, cвmbio.", sendername, result);}
                  else if(PlayerInfo[playerid][pRank] == 3){format(string, sizeof(string), "Capitгo %s: %s, cвmbio.", sendername, result);}
                  else if(PlayerInfo[playerid][pRank] == 4){format(string, sizeof(string), "Coronel %s: %s, cвmbio.", sendername, result);}
                  else if(PlayerInfo[playerid][pRank] == 5){format(string, sizeof(string), "Comandante Geral %s: %s, cвmbio.", sendername, result);}
                  else if(PlayerInfo[playerid][pRank] == 6){format(string, sizeof(string), "Chefe de Estado Maior %s: %s, cвmbio.", sendername, result);}
                  else
                  {
                    format(string, sizeof(string), "Cabo %s: %s, cвmbio. ", sendername, result);
                  }
                    SendRadioMessage(1, TEAM_BLUE_COLOR, string);
                    printf("%s", string);
                    return 1;
              }
              else if(PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pLeader] == 2)//BOPE radio
              {
                 if(PlayerInfo[playerid][pRank] == 1){format(string, sizeof(string), "Aspira %s: %s, cвmbio.", sendername, result);}
                 else if(PlayerInfo[playerid][pRank] == 2){format(string, sizeof(string), "Soldado %s: %s, cвmbio.", sendername, result);}
                 else if(PlayerInfo[playerid][pRank] == 3){format(string, sizeof(string), "Sargento %s: %s, cвmbio.", sendername, result);}
                 else if(PlayerInfo[playerid][pRank] == 4){format(string, sizeof(string), "Tenente %s: %s, cвmbio.", sendername, result);}
                 else if(PlayerInfo[playerid][pRank] == 5){format(string, sizeof(string), "Tenente-Coronel %s: %s, cвmbio.", sendername, result);}
                 else if(PlayerInfo[playerid][pRank] == 6){format(string, sizeof(string), "Comandante %s: %s, cвmbio.", sendername, result);}
                 else
                  {
                    format(string, sizeof(string), "Aspira %s: %s, cвmbio.", sendername, result);
                  }
                    SendRadioMessage(2, TEAM_BLUE_COLOR, string);
                    printf("%s", string);
                    return 1;
             }
             else if(PlayerInfo[playerid][pMember] == 3 || PlayerInfo[playerid][pLeader] == 3)//DETRAN radio
             {
                 if(PlayerInfo[playerid][pRank] == 1){format(string, sizeof(string), "Estagiбrio %s: %s, cвmbio.", sendername, result);}
                 else if(PlayerInfo[playerid][pRank] == 2){format(string, sizeof(string), "Agente 02 %s: %s, cвmbio.", sendername, result);}
                 else if(PlayerInfo[playerid][pRank] == 3){format(string, sizeof(string), "Agente 01 %s: %s, cвmbio.", sendername, result);}
                 else if(PlayerInfo[playerid][pRank] == 4){format(string, sizeof(string), "NOE %s: %s, cвmbio.", sendername, result);}
                 else if(PlayerInfo[playerid][pRank] == 5){format(string, sizeof(string), "Sub-Delegado %s: %s, cвmbio.", sendername, result);}
                 else if(PlayerInfo[playerid][pRank] == 6){format(string, sizeof(string), "Delegado %s: %s, cвmbio.", sendername, result);}
                 else
                  {
                    format(string, sizeof(string), "Estagiбrio %s: %s, cвmbio.", sendername, result);
                  }
                    SendRadioMessage(3, TEAM_BLUE_COLOR, string);
                    printf("%s", string);
                    return 1;
            }
            else if(PlayerInfo[playerid][pMember] == 4 || PlayerInfo[playerid][pLeader] == 4)//PF radio
            {
                 if(PlayerInfo[playerid][pRank] == 1){format(string, sizeof(string), "Investigador %s: %s, cвmbio.", sendername, result);}
                 else if(PlayerInfo[playerid][pRank] == 2){format(string, sizeof(string), "Procurador %s: %s, cвmbio.", sendername, result);}
                 else if(PlayerInfo[playerid][pRank] == 3){format(string, sizeof(string), "Escrivao %s: %s, cвmbio.", sendername, result);}
                 else if(PlayerInfo[playerid][pRank] == 4){format(string, sizeof(string), "Agente %s: %s, cвmbio.", sendername, result);}
                 else if(PlayerInfo[playerid][pRank] == 5){format(string, sizeof(string), "Perito %s: %s, cвmbio.", sendername, result);}
                 else if(PlayerInfo[playerid][pRank] == 6){format(string, sizeof(string), "Delegado %s: %s, cвmbio.", sendername, result);}
                 else
                  {
                    format(string, sizeof(string), "Investigador %s: %s, cвmbio.", sendername, result);
                  }
                    SendRadioMessage(4, TEAM_BLUE_COLOR, string);
                    printf("%s", string);
                    return 1;
            }
            else if(PlayerInfo[playerid][pMember] == 5 || PlayerInfo[playerid][pLeader] == 5)//FA radio
            {
                 if(PlayerInfo[playerid][pRank] == 1){format(string, sizeof(string), "Soldado %s: %s, cвmbio.", sendername, result);}
                 else if(PlayerInfo[playerid][pRank] == 2){format(string, sizeof(string), "Sargento %s: %s, cвmbio.", sendername, result);}
                 else if(PlayerInfo[playerid][pRank] == 3){format(string, sizeof(string), "Tenente %s: %s, cвmbio.", sendername, result);}
                 else if(PlayerInfo[playerid][pRank] == 4){format(string, sizeof(string), "Capitгo %s: %s, cвmbio.", sendername, result);}
                 else if(PlayerInfo[playerid][pRank] == 5){format(string, sizeof(string), "Coronel %s: %s, cвmbio.", sendername, result);}
                 else if(PlayerInfo[playerid][pRank] == 6){format(string, sizeof(string), "General %s: %s, cвmbio.", sendername, result);}
                 else
                  {
                    format(string, sizeof(string), "Soldado %s: %s, cвmbio.", sendername, result);
                  }
                    SendRadioMessage(5, TEAM_BLUE_COLOR, string);
                    printf("%s", string);
                    return 1;
            }
            if(PlayerInfo[playerid][pMember] == 6 || PlayerInfo[playerid][pLeader] == 6)//Groove radio
              {
                  if(PlayerInfo[playerid][pRank] == 1){format(string, sizeof(string), "Aspira %s: %s, cвmbio.", sendername, result);}
                  else if(PlayerInfo[playerid][pRank] == 2){format(string, sizeof(string), "Aviгozinho %s: %s, cвmbio.", sendername, result);}
                  else if(PlayerInfo[playerid][pRank] == 3){format(string, sizeof(string), "Gangster %s: %s, cвmbio.", sendername, result);}
                  else if(PlayerInfo[playerid][pRank] == 4){format(string, sizeof(string), "Sub-Traficante %s: %s, cвmbio.", sendername, result);}
                  else if(PlayerInfo[playerid][pRank] == 5){format(string, sizeof(string), "Traficante %s: %s, cвmbio.", sendername, result);}
                  else if(PlayerInfo[playerid][pRank] == 6){format(string, sizeof(string), "Senhor %s: %s, cвmbio.", sendername, result);}
                  else
                  {
                    format(string, sizeof(string), "Aspira %s: %s, cвmbio. ", sendername, result);
                  }
                    SendRadioMessage(6, TEAM_BLUE_COLOR, string);
                    printf("%s", string);
                    return 1;
              }
             else if(PlayerInfo[playerid][pMember] == 7 || PlayerInfo[playerid][pLeader] == 7)//Ballas radio
             {
                 if(PlayerInfo[playerid][pRank] == 1){format(string, sizeof(string), "Aspira %s: %s, cвmbio.", sendername, result);}
                 else if(PlayerInfo[playerid][pRank] == 2){format(string, sizeof(string), "Aviгozinho 02 %s: %s, cвmbio.", sendername, result);}
                 else if(PlayerInfo[playerid][pRank] == 3){format(string, sizeof(string), "Gangster 01 %s: %s, cвmbio.", sendername, result);}
                 else if(PlayerInfo[playerid][pRank] == 4){format(string, sizeof(string), "Sub-Traficante %s: %s, cвmbio.", sendername, result);}
                 else if(PlayerInfo[playerid][pRank] == 5){format(string, sizeof(string), "Traficante %s: %s, cвmbio.", sendername, result);}
                 else if(PlayerInfo[playerid][pRank] == 6){format(string, sizeof(string), "Senhor %s: %s, cвmbio.", sendername, result);}
                 else
                  {
                    format(string, sizeof(string), "Aspira %s: %s, cвmbio.", sendername, result);
                  }
                    SendRadioMessage(7, TEAM_BLUE_COLOR, string);
                    printf("%s", string);
                    return 1;
            }
            else if(PlayerInfo[playerid][pMember] == 8 || PlayerInfo[playerid][pLeader] == 8)//Hitmans radio
            {
                 if(PlayerInfo[playerid][pRank] == 1){format(string, sizeof(string), "Freeman %s: %s, cвmbio.", sendername, result);}
                 else if(PlayerInfo[playerid][pRank] == 2){format(string, sizeof(string), "Associado %s: %s, cвmbio.", sendername, result);}
                 else if(PlayerInfo[playerid][pRank] == 3){format(string, sizeof(string), "Matador de aluguel %s: %s, cвmbio.", sendername, result);}
                 else if(PlayerInfo[playerid][pRank] == 4){format(string, sizeof(string), "Hitman %s: %s, cвmbio.", sendername, result);}
                 else if(PlayerInfo[playerid][pRank] == 5){format(string, sizeof(string), "Sub-Chefe %s: %s, cвmbio.", sendername, result);}
                 else if(PlayerInfo[playerid][pRank] == 6){format(string, sizeof(string), "Chefe %s: %s, cвmbio.", sendername, result);}
                 else
                  {
                    format(string, sizeof(string), "Freeman %s: %s, cвmbio.", sendername, result);
                  }
                    SendRadioMessage(8, TEAM_BLUE_COLOR, string);
                    printf("%s", string);
                    return 1;
            }
            else if(PlayerInfo[playerid][pMember] == 9 || PlayerInfo[playerid][pLeader] == 9)//Pref radio
            {
                 if(PlayerInfo[playerid][pRank] == 1){format(string, sizeof(string), "Motorista %s: %s, cвmbio.", sendername, result);}
                 else if(PlayerInfo[playerid][pRank] == 2){format(string, sizeof(string), "Seguranзa %s: %s, cвmbio.", sendername, result);}
                 else if(PlayerInfo[playerid][pRank] == 3){format(string, sizeof(string), "Seguranзa Chefe %s: %s, cвmbio.", sendername, result);}
                 else if(PlayerInfo[playerid][pRank] == 4){format(string, sizeof(string), "Veriador %s: %s, cвmbio.", sendername, result);}
                 else if(PlayerInfo[playerid][pRank] == 5){format(string, sizeof(string), "Vice-Prefeito %s: %s, cвmbio.", sendername, result);}
                 else if(PlayerInfo[playerid][pRank] == 6){format(string, sizeof(string), "Prefeito %s: %s, cвmbio.", sendername, result);}
                 else
                  {
                    format(string, sizeof(string), "Motorista %s: %s, cвmbio.", sendername, result);
                  }
                    SendRadioMessage(9, TEAM_BLUE_COLOR, string);
                    printf("%s", string);
                    return 1;
            }
            if(PlayerInfo[playerid][pMember] == 10 || PlayerInfo[playerid][pLeader] == 10)//Sannews radio
              {
                  if(PlayerInfo[playerid][pRank] == 1){format(string, sizeof(string), "Fotografo %s: %s, cвmbio.", sendername, result);}
                  else if(PlayerInfo[playerid][pRank] == 2){format(string, sizeof(string), "Cenegrafista %s: %s, cвmbio.", sendername, result);}
                  else if(PlayerInfo[playerid][pRank] == 3){format(string, sizeof(string), "Reporter %s: %s, cвmbio.", sendername, result);}
                  else if(PlayerInfo[playerid][pRank] == 4){format(string, sizeof(string), "Вncora %s: %s, cвmbio.", sendername, result);}
                  else if(PlayerInfo[playerid][pRank] == 5){format(string, sizeof(string), "Apresentador %s: %s, cвmbio.", sendername, result);}
                  else if(PlayerInfo[playerid][pRank] == 6){format(string, sizeof(string), "Diretor %s: %s, cвmbio.", sendername, result);}
                  else
                  {
                    format(string, sizeof(string), "Fotografo %s: %s, cвmbio. ", sendername, result);
                  }
                    SendRadioMessage(10, TEAM_BLUE_COLOR, string);
                    printf("%s", string);
                    return 1;
              }
              else if(PlayerInfo[playerid][pMember] == 11 || PlayerInfo[playerid][pLeader] == 11)//low radio
              {
                 if(PlayerInfo[playerid][pRank] == 1){format(string, sizeof(string), "Novato %s: %s, cвmbio.", sendername, result);}
                 else if(PlayerInfo[playerid][pRank] == 2){format(string, sizeof(string), "Recruta %s: %s, cвmbio.", sendername, result);}
                 else if(PlayerInfo[playerid][pRank] == 3){format(string, sizeof(string), "Membro %s: %s, cвmbio.", sendername, result);}
                 else if(PlayerInfo[playerid][pRank] == 4){format(string, sizeof(string), "Braзo Direito %s: %s, cвmbio.", sendername, result);}
                 else if(PlayerInfo[playerid][pRank] == 5){format(string, sizeof(string), "Sub-Chefe %s: %s, cвmbio.", sendername, result);}
                 else if(PlayerInfo[playerid][pRank] == 6){format(string, sizeof(string), "Chefe %s: %s, cвmbio.", sendername, result);}
                 else
                  {
                    format(string, sizeof(string), "Novato %s: %s, cвmbio.", sendername, result);
                  }
                    SendRadioMessage(11, TEAM_BLUE_COLOR, string);
                    printf("%s", string);
                    return 1;
             }
             else if(PlayerInfo[playerid][pMember] == 12 || PlayerInfo[playerid][pLeader] == 12)//Drifters radio
             {
                 if(PlayerInfo[playerid][pRank] == 1){format(string, sizeof(string), "Novato %s: %s, cвmbio.", sendername, result);}
                 else if(PlayerInfo[playerid][pRank] == 2){format(string, sizeof(string), "Recruta %s: %s, cвmbio.", sendername, result);}
                 else if(PlayerInfo[playerid][pRank] == 3){format(string, sizeof(string), "Membro %s: %s, cвmbio.", sendername, result);}
                 else if(PlayerInfo[playerid][pRank] == 4){format(string, sizeof(string), "Braзo Direito %s: %s, cвmbio.", sendername, result);}
                 else if(PlayerInfo[playerid][pRank] == 5){format(string, sizeof(string), "Sub-Chefe %s: %s, cвmbio.", sendername, result);}
                 else if(PlayerInfo[playerid][pRank] == 6){format(string, sizeof(string), "Chefe %s: %s, cвmbio.", sendername, result);}
                 else
                  {
                    format(string, sizeof(string), "Novato %s: %s, cвmbio.", sendername, result);
                  }
                    SendRadioMessage(12, TEAM_BLUE_COLOR, string);
                    printf("%s", string);
                    return 1;
            }
            else if(PlayerInfo[playerid][pMember] == 13 || PlayerInfo[playerid][pLeader] == 13)//Triads radio
            {
                 if(PlayerInfo[playerid][pRank] == 1){format(string, sizeof(string), "Novato %s: %s, cвmbio.", sendername, result);}
                 else if(PlayerInfo[playerid][pRank] == 2){format(string, sizeof(string), "Membro %s: %s, cвmbio.", sendername, result);}
                 else if(PlayerInfo[playerid][pRank] == 3){format(string, sizeof(string), "Sub-Dirigente %s: %s, cвmbio.", sendername, result);}
                 else if(PlayerInfo[playerid][pRank] == 4){format(string, sizeof(string), "Dirigente %s: %s, cвmbio.", sendername, result);}
                 else if(PlayerInfo[playerid][pRank] == 5){format(string, sizeof(string), "Sub-Lнder %s: %s, cвmbio.", sendername, result);}
                 else if(PlayerInfo[playerid][pRank] == 6){format(string, sizeof(string), "Lнderгo %s: %s, cвmbio.", sendername, result);}
                 else
                  {
                    format(string, sizeof(string), "Novato %s: %s, cвmbio.", sendername, result);
                  }
                    SendRadioMessage(13, TEAM_BLUE_COLOR, string);
                    printf("%s", string);
                    return 1;
            }
            else if(PlayerInfo[playerid][pMember] == 14 || PlayerInfo[playerid][pLeader] == 14)//Nang radio
            {
                 if(PlayerInfo[playerid][pRank] == 1){format(string, sizeof(string), "Novato %s: %s, cвmbio.", sendername, result);}
                 else if(PlayerInfo[playerid][pRank] == 2){format(string, sizeof(string), "Membro %s: %s, cвmbio.", sendername, result);}
                 else if(PlayerInfo[playerid][pRank] == 3){format(string, sizeof(string), "Sub-Dirigente %s: %s, cвmbio.", sendername, result);}
                 else if(PlayerInfo[playerid][pRank] == 4){format(string, sizeof(string), "Dirigente %s: %s, cвmbio.", sendername, result);}
                 else if(PlayerInfo[playerid][pRank] == 5){format(string, sizeof(string), "Sub-Lнder %s: %s, cвmbio.", sendername, result);}
                 else if(PlayerInfo[playerid][pRank] == 6){format(string, sizeof(string), "Lнderгo %s: %s, cвmbio.", sendername, result);}
                 else
                  {
                    format(string, sizeof(string), "Novato %s: %s, cвmbio.", sendername, result);
                  }
                    SendRadioMessage(14, TEAM_BLUE_COLOR, string);
                    printf("%s", string);
                    return 1;
            }
            else if(PlayerInfo[playerid][pMember] == 15 || PlayerInfo[playerid][pLeader] == 15)//alqaeda radio
            {
                 if(PlayerInfo[playerid][pRank] == 1){format(string, sizeof(string), "Homem Bomba %s: %s, cвmbio.", sendername, result);}
                 else if(PlayerInfo[playerid][pRank] == 2){format(string, sizeof(string), "Guerrilhero %s: %s, cвmbio.", sendername, result);}
                 else if(PlayerInfo[playerid][pRank] == 3){format(string, sizeof(string), "Terrorista %s: %s, cвmbio.", sendername, result);}
                 else if(PlayerInfo[playerid][pRank] == 4){format(string, sizeof(string), "Bombardeador %s: %s, cвmbio.", sendername, result);}
                 else if(PlayerInfo[playerid][pRank] == 5){format(string, sizeof(string), "Projeto de Osama %s: %s, cвmbio.", sendername, result);}
                 else if(PlayerInfo[playerid][pRank] == 6){format(string, sizeof(string), "Osama %s: %s, cвmbio.", sendername, result);}
                 else
                  {
                    format(string, sizeof(string), "Homem Bomba %s: %s, cвmbio.", sendername, result);
                  }
                    SendRadioMessage(15, TEAM_BLUE_COLOR, string);
                    printf("%s", string);
                    return 1;
            }
            else
            {
                SendClientMessage(playerid, COLOR_GRAD2, "   Vocк nгo pode usar o rбdio !");
                return 1;
            }
        }
        return 1;
    }
/departamentos
pawn Код:
if(strcmp(cmd, "/departamentos", true) == 0 || strcmp(cmd, "/d", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            if(PlayerInfo[playerid][pMuted] == 1)
            {
                SendClientMessage(playerid, COLOR_RED, "|-Vocк foi mutado por um admin, nгo pode falar-|");
                return 1;
            }
            GetPlayerName(playerid, sendername, sizeof(sendername));
            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))
            {
                SendClientMessage(playerid, COLOR_GRAD2, "USO: (/d)epartamentos [departmento chat]");
                return 1;
            }
            if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1)//PM radio
            {
                if(PlayerInfo[playerid][pRank] == 1){format(string, sizeof(string), "Cabo %s: %s, cвmbio.", sendername, result);}
                else if(PlayerInfo[playerid][pRank] == 2){format(string, sizeof(string), "Sub-Tenente %s: %s, cвmbio.", sendername, result);}
                else if(PlayerInfo[playerid][pRank] == 3){format(string, sizeof(string), "Capitгo %s: %s, cвmbio.", sendername, result);}
                else if(PlayerInfo[playerid][pRank] == 4){format(string, sizeof(string), "Coronel %s: %s, cвmbio.", sendername, result);}
                else if(PlayerInfo[playerid][pRank] == 5){format(string, sizeof(string), "Comandante Geral %s: %s, cвmbio.", sendername, result);}
                else if(PlayerInfo[playerid][pRank] == 6){format(string, sizeof(string), "Chefe de Estado Maior %s: %s, cвmbio.", sendername, result);}
                else
                {
                    format(string, sizeof(string), "Cabo %s: %s, cвmbio. ", sendername, result);
                }

                SendTeamMessage(2, COLOR_ALLDEPT, string);
                SendTeamMessage(3, COLOR_ALLDEPT, string);
                SendTeamMessage(4, COLOR_ALLDEPT, string);
                SendTeamMessage(5, COLOR_ALLDEPT, string);
                SendTeamMessage(9, COLOR_ALLDEPT, string);
                printf("%s", string);
                return 1;
            }
            else if(PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pLeader] == 2)//BOPE radio
            {
                if(PlayerInfo[playerid][pRank] == 1){format(string, sizeof(string), "Aspira %s: %s, cвmbio.", sendername, result);}
                else if(PlayerInfo[playerid][pRank] == 2){format(string, sizeof(string), "Soldado %s: %s, cвmbio.", sendername, result);}
                else if(PlayerInfo[playerid][pRank] == 3){format(string, sizeof(string), "Sargento %s: %s, cвmbio.", sendername, result);}
                else if(PlayerInfo[playerid][pRank] == 4){format(string, sizeof(string), "Tenente %s: %s, cвmbio.", sendername, result);}
                else if(PlayerInfo[playerid][pRank] == 5){format(string, sizeof(string), "Tenente-Coronel %s: %s, cвmbio.", sendername, result);}
                else if(PlayerInfo[playerid][pRank] == 6){format(string, sizeof(string), "Comandante %s: %s, cвmbio.", sendername, result);}
                else
                {
                    format(string, sizeof(string), "Aspira %s: %s, cвmbio.", sendername, result);
                }
                SendTeamMessage(1, COLOR_ALLDEPT, string);
                SendTeamMessage(2, COLOR_ALLDEPT, string);
                SendTeamMessage(3, COLOR_ALLDEPT, string);
                SendTeamMessage(4, COLOR_ALLDEPT, string);
                SendTeamMessage(5, COLOR_ALLDEPT, string);
                SendTeamMessage(9, COLOR_ALLDEPT, string);
                printf("%s", string);
                return 1;
            }
            else if(PlayerInfo[playerid][pMember] == 3 || PlayerInfo[playerid][pLeader] == 3)//DETRAN radio
            {
                if(PlayerInfo[playerid][pRank] == 1){format(string, sizeof(string), "Estagiбrio %s: %s, cвmbio.", sendername, result);}
                else if(PlayerInfo[playerid][pRank] == 2){format(string, sizeof(string), "Agente 02 %s: %s, cвmbio.", sendername, result);}
                else if(PlayerInfo[playerid][pRank] == 3){format(string, sizeof(string), "Agente 01 %s: %s, cвmbio.", sendername, result);}
                else if(PlayerInfo[playerid][pRank] == 4){format(string, sizeof(string), "NOE %s: %s, cвmbio.", sendername, result);}
                else if(PlayerInfo[playerid][pRank] == 5){format(string, sizeof(string), "Sub-Delegado %s: %s, cвmbio.", sendername, result);}
                else if(PlayerInfo[playerid][pRank] == 6){format(string, sizeof(string), "Delegado %s: %s, cвmbio.", sendername, result);}
                else
                {
                    format(string, sizeof(string), "Estagiбrio %s: %s, cвmbio.", sendername, result);
                }
                SendTeamMessage(1, COLOR_ALLDEPT, string);
                SendTeamMessage(2, COLOR_ALLDEPT, string);
                SendTeamMessage(3, COLOR_ALLDEPT, string);
                SendTeamMessage(4, COLOR_ALLDEPT, string);
                SendTeamMessage(5, COLOR_ALLDEPT, string);
                SendTeamMessage(9, COLOR_ALLDEPT, string);
                printf("%s", string);
                return 1;
            }
            else if(PlayerInfo[playerid][pMember] == 4 || PlayerInfo[playerid][pLeader] == 4)//PF radio
            {
                if(PlayerInfo[playerid][pRank] == 1){format(string, sizeof(string), "Investigador %s: %s, cвmbio.", sendername, result);}
                else if(PlayerInfo[playerid][pRank] == 2){format(string, sizeof(string), "Procurador %s: %s, cвmbio.", sendername, result);}
                else if(PlayerInfo[playerid][pRank] == 3){format(string, sizeof(string), "Escrivao %s: %s, cвmbio.", sendername, result);}
                else if(PlayerInfo[playerid][pRank] == 4){format(string, sizeof(string), "Agente %s: %s, cвmbio.", sendername, result);}
                else if(PlayerInfo[playerid][pRank] == 5){format(string, sizeof(string), "Perito %s: %s, cвmbio.", sendername, result);}
                else if(PlayerInfo[playerid][pRank] == 6){format(string, sizeof(string), "Delegado %s: %s, cвmbio.", sendername, result);}
                else
                {
                    format(string, sizeof(string), "Investigador %s: %s, cвmbio.", sendername, result);
                }
                SendTeamMessage(1, COLOR_ALLDEPT, string);
                SendTeamMessage(2, COLOR_ALLDEPT, string);
                SendTeamMessage(3, COLOR_ALLDEPT, string);
                SendTeamMessage(4, COLOR_ALLDEPT, string);
                SendTeamMessage(5, COLOR_ALLDEPT, string);
                SendTeamMessage(9, COLOR_ALLDEPT, string);
                printf("%s", string);
                return 1;
            }
            else if(PlayerInfo[playerid][pMember] == 5 || PlayerInfo[playerid][pLeader] == 5)//FA radio
            {
                if(PlayerInfo[playerid][pRank] == 1){format(string, sizeof(string), "Soldado %s: %s, cвmbio.", sendername, result);}
                else if(PlayerInfo[playerid][pRank] == 2){format(string, sizeof(string), "Sargento %s: %s, cвmbio.", sendername, result);}
                else if(PlayerInfo[playerid][pRank] == 3){format(string, sizeof(string), "Tenente %s: %s, cвmbio.", sendername, result);}
                else if(PlayerInfo[playerid][pRank] == 4){format(string, sizeof(string), "Capitгo %s: %s, cвmbio.", sendername, result);}
                else if(PlayerInfo[playerid][pRank] == 5){format(string, sizeof(string), "Coronel %s: %s, cвmbio.", sendername, result);}
                else if(PlayerInfo[playerid][pRank] == 6){format(string, sizeof(string), "General %s: %s, cвmbio.", sendername, result);}
                else
                {
                    format(string, sizeof(string), "Soldado %s: %s, cвmbio.", sendername, result);
                }
                SendTeamMessage(1, COLOR_ALLDEPT, string);
                SendTeamMessage(2, COLOR_ALLDEPT, string);
                SendTeamMessage(3, COLOR_ALLDEPT, string);
                SendTeamMessage(4, COLOR_ALLDEPT, string);
                SendTeamMessage(5, COLOR_ALLDEPT, string);
                SendTeamMessage(9, COLOR_ALLDEPT, string);
                printf("%s", string);
                return 1;
            }
            else if(PlayerInfo[playerid][pMember] == 9 || PlayerInfo[playerid][pLeader] == 9)//Pref radio
            {
                if(PlayerInfo[playerid][pRank] == 1){format(string, sizeof(string), "Motorista %s: %s, cвmbio.", sendername, result);}
                else if(PlayerInfo[playerid][pRank] == 2){format(string, sizeof(string), "Seguranзa %s: %s, cвmbio.", sendername, result);}
                else if(PlayerInfo[playerid][pRank] == 3){format(string, sizeof(string), "Seguranзa Chefe %s: %s, cвmbio.", sendername, result);}
                else if(PlayerInfo[playerid][pRank] == 4){format(string, sizeof(string), "Veriador %s: %s, cвmbio.", sendername, result);}
                else if(PlayerInfo[playerid][pRank] == 5){format(string, sizeof(string), "Vice-Prefeito %s: %s, cвmbio.", sendername, result);}
                else if(PlayerInfo[playerid][pRank] == 6){format(string, sizeof(string), "Prefeito %s: %s, cвmbio.", sendername, result);}
                else
                {
                    format(string, sizeof(string), "Motorista %s: %s, cвmbio.", sendername, result);
                }
                SendTeamMessage(1, COLOR_ALLDEPT, string);
                SendTeamMessage(2, COLOR_ALLDEPT, string);
                SendTeamMessage(3, COLOR_ALLDEPT, string);
                SendTeamMessage(4, COLOR_ALLDEPT, string);
                SendTeamMessage(5, COLOR_ALLDEPT, string);
                SendTeamMessage(9, COLOR_ALLDEPT, string);

                printf("%s", string);
                return 1;
            }
            else
            {
                SendClientMessage(playerid, COLOR_GRAD2, "Vocк nгo faz parte do governo!");
                return 1;
            }
        }
        return 1;
    }
public SendRadioMessage
pawn Код:
public SendRadioMessage(member, color, string[])
{
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        new leader = PlayerInfo[i][pLeader];
        if(IsPlayerConnected(i))
        {
            if(PlayerInfo[i][pMember] == member || PlayerInfo[i][pLeader] == leader)
            {
                SendClientMessage(i, color, string);
            }
        }
    }
}
public SendTeamMessage
pawn Код:
public SendTeamMessage(member, color, string[])
{
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        new leader = PlayerInfo[i][pLeader];
        if(IsPlayerConnected(i))
        {
            if(PlayerInfo[i][pMember] == member || PlayerInfo[i][pLeader] == leader)
            {
                SendClientMessage(i, color, string);
            }
        }
    }
}
Espero que alguem me ajude.
Obrigado.