if (strcmp(cmd, "/lideres", true) == 0) { if(IsPlayerConnected(playerid)) { SendClientMessage(playerid, COLOR_YELLOW, "|-Elite City lideres presentes-|"); for(new i = 0; i < MAX_PLAYERS; i++) { if(IsPlayerConnected(i)) { if(PlayerInfo[i][pLeader] == 1){GetPlayerName(i, sendername, sizeof(sendername));format(string, 256, "Policia Militar: %s", sendername);SendClientMessage(playerid, BLUE, string);} if(PlayerInfo[i][pLeader] == 2){GetPlayerName(i, sendername, sizeof(sendername));format(string, 256, "Policia Federal: %s", sendername);SendClientMessage(playerid, BLUE, string);} if(PlayerInfo[i][pLeader] == 3){GetPlayerName(i, sendername, sizeof(sendername));format(string, 256, "Forcas Armadas: %s", sendername);SendClientMessage(playerid, BLUE, string);} if(PlayerInfo[i][pLeader] == 4){GetPlayerName(i, sendername, sizeof(sendername));format(string, 256, "Medicos: %s", sendername);SendClientMessage(playerid, COLOR_WHITE, string);} if(PlayerInfo[i][pLeader] == 5){GetPlayerName(i, sendername, sizeof(sendername));format(string, 256, "Front Yard Ballas: %s", sendername);SendClientMessage(playerid, TEAM_BALLAS_COLOR, string);} if(PlayerInfo[i][pLeader] == 6){GetPlayerName(i, sendername, sizeof(sendername));format(string, 256, "Grove Street Families: %s", sendername);SendClientMessage(playerid, TEAM_GROVE_COLOR, string);} if(PlayerInfo[i][pLeader] == 7){GetPlayerName(i, sendername, sizeof(sendername));format(string, 256, "Prefeito: %s", sendername);SendClientMessage(playerid, COLOR_YELLOW, string);} if(PlayerInfo[i][pLeader] == {GetPlayerName(i, sendername, sizeof(sendername));format(string, 256, "Hitman: %s", sendername);SendClientMessage(playerid, COLOR_WHITE, string);} if(PlayerInfo[i][pLeader] == 9){GetPlayerName(i, sendername, sizeof(sendername));format(string, 256, "Reporter: %s", sendername);SendClientMessage(playerid, COLOR_WHITE, string);} if(PlayerInfo[i][pLeader] == 10){GetPlayerName(i, sendername, sizeof(sendername));format(string, 256, "Lowrider: %s", sendername);SendClientMessage(playerid, COLOR_WHITE, string);} if(PlayerInfo[i][pLeader] == 12){GetPlayerName(i, sendername, sizeof(sendername));format(string, 256, "Los Santos Vagos: %s", sendername);SendClientMessage(playerid, TEAM_VAGOS_COLOR, string);} if(PlayerInfo[i][pLeader] == 13){GetPlayerName(i, sendername, sizeof(sendername));format(string, 256, "Asphalt King's: %s", sendername);SendClientMessage(playerid, TEAM_MOTOCA_COLOR, string);} if(PlayerInfo[i][pLeader] == 14){GetPlayerName(i, sendername, sizeof(sendername));format(string, 256, "Milнcia: %s", sendername);SendClientMessage(playerid, BLUE, string);} if(PlayerInfo[i][pLeader] == 15){GetPlayerName(i, sendername, sizeof(sendername));format(string, 256, "Varrio Los Aztecas: %s", sendername);SendClientMessage(playerid, TEAM_AZTECAS_COLOR, string);} if(PlayerInfo[i][pLeader] == 16){GetPlayerName(i, sendername, sizeof(sendername));format(string, 256, "Triads: %s", sendername);SendClientMessage(playerid, COLOR_WHITE, string);} if(PlayerInfo[i][pLeader] == 17){GetPlayerName(i, sendername, sizeof(sendername));format(string, 256, "Mafia Yakuza: %s", sendername);SendClientMessage(playerid, COLOR_WHITE, string);} if(PlayerInfo[i][pLeader] == 1{GetPlayerName(i, sendername, sizeof(sendername));format(string, 256, "Drifters: %s", sendername);SendClientMessage(playerid, COLOR_WHITE, string);} if(PlayerInfo[i][pLeader] == 19){GetPlayerName(i, sendername, sizeof(sendername));format(string, 256, "Comando Vermelho: %s", sendername);SendClientMessage(playerid, TEAM_COMANDO_COLOR, string);} if(PlayerInfo[i][pLeader] == 20){GetPlayerName(i, sendername, sizeof(sendername));format(string, 256, "Pcc: %s", sendername);SendClientMessage(playerid, TEAM_PCC_COLOR, string);} if(PlayerInfo[i][pLeader] == 21){GetPlayerName(i, sendername, sizeof(sendername));format(string, 256, "Swat: %s", sendername);SendClientMessage(playerid, BLUE, string);} if(PlayerInfo[i][pLeader] == 22){GetPlayerName(i, sendername, sizeof(sendername));format(string, 256, "Al-Qaeda: %s", sendername);SendClientMessage(playerid, COLOR_WHITE, string);} } } } return 1; } |
if(strcmp(cmd, "/darlider", true) == 0) { if(IsPlayerConnected(playerid)) { tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GRAD2, "USO: /darlider [playerid/Parte-do-Nick] [Number(1-17)]"); return 1; } new para1; new level; para1 = ReturnUser(tmp); tmp = strtok(cmdtext, idx); level = strval(tmp); if(level > 22 || level < 0) { SendClientMessage(playerid, COLOR_GREY, " Nъmeros entre 1 e 21"); return 1; } if (PlayerInfo[playerid][pAdmin] >= 4) { if(IsPlayerConnected(para1)) { if(para1 != INVALID_PLAYER_ID) { GetPlayerName(para1, giveplayer, sizeof(giveplayer)); GetPlayerName(playerid, sendername, sizeof(sendername)); PlayerInfo[para1][pLeader] = level; format(string, sizeof(string), "%s lhe deu o direito administraзгo profissional, digite /rg.", sendername); SendClientMessage(para1, COLOR_LIGHTBLUE, string); format(string, sizeof(string), "%s й o novo lнder administrativo profissional (%d).", giveplayer,level); SendClientMessage(playerid, COLOR_LIGHTBLUE, string); if(level == 0) { PlayerInfo[para1][pChar] = 23; } else if(level == 1) { PlayerInfo[para1][pChar] = 265; gTeam[para1] = 2; } //Police Force else if(level == 2) { PlayerInfo[para1][pChar] = 286; gTeam[para1] = 2; } //FBI/ATF else if(level == 3) { PlayerInfo[para1][pChar] = 287; gTeam[para1] = 2;} //National Guard else if(level == 4) { PlayerInfo[para1][pChar] = 70; gTeam[para1] = 4;} //Fire/Ambulance else if(level == 5) { PlayerInfo[para1][pChar] = 104; gTeam[para1] = 7;} //Ballas else if(level == 6) { PlayerInfo[para1][pChar] = 270; gTeam[para1] = 7;} //Grove else if(level == 7) { PlayerInfo[para1][pChar] = 147; gTeam[para1] = 8;} //prefeito else if(level == { PlayerInfo[para1][pChar] = 165; gTeam[para1] = 8;} //M.I. else if(level == 9) { PlayerInfo[para1][pChar] = 295; gTeam[para1] = 9;} //News Reporters else if(level == 10) { PlayerInfo[para1][pChar] = 47; gTeam[para1] = 47;} //ggc else if(level == 12) { PlayerInfo[para1][pChar] = 108; gTeam[para1] = 7;} //Los Santos Vagos else if(level == 13) { PlayerInfo[para1][pChar] = 181; gTeam[para1] = 7;} //motoqueiros else if(level == 14) { PlayerInfo[para1][pChar] = 124; gTeam[para1] = 14;} //motoqueiros else if(level == 15) { PlayerInfo[para1][pChar] = 115; gTeam[para1] = 7; } //Aztecas else if(level == 16) { PlayerInfo[para1][pChar] = 118; gTeam[para1] = 16; } //Mafia else if(level == 17) { PlayerInfo[para1][pChar] = 294; gTeam[para1] = 16; } //Milicia else if(level == 1 { PlayerInfo[para1][pChar] = 292; gTeam[para1] = 16; } //Drifters else if(level == 19) { PlayerInfo[para1][pChar] = 19; gTeam[para1] = 16; } //Lowriders else if(level == 20) { PlayerInfo[para1][pChar] = 293; gTeam[para1] = 16; } //Lowriders else if(level == 21) { PlayerInfo[para1][pChar] = 285; gTeam[para1] = 21; } //swat else if(level == 22) { PlayerInfo[para1][pChar] = 290; gTeam[para1] = 22; } //swat PlayerInfo[para1][pMember] = level; PlayerInfo[para1][pRank] = 6; PlayerInfo[para1][pTeam] = gTeam[para1]; PlayerInfo[para1][pModel] = PlayerInfo[para1][pChar]; SetPlayerSkin(para1, PlayerInfo[para1][pChar]); } }//not connected } else { SendClientMessage(playerid, COLOR_GRAD1, " Sem Autorizaзгo."); } } return 1; } |
use SendClientMessageToAll para mandar uma mensagem para todos verem... e sobre os celulares й dificil de te ajudar pois nгo conheзo o seu GM e a variбvel que define celular '-' __________________ |
if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GRAD1, "USO: /tel(efone) [playerid/Parte-do-Nick]"); return 1; } //giveplayerid = strval(tmp); giveplayerid = ReturnUser(tmp); if(IsPlayerConnected(giveplayerid)) { if(giveplayerid != INVALID_PLAYER_ID) { GetPlayerName(giveplayerid, sendername, sizeof(sendername)); format(string, 256, "[%d] Usuбrio: %s, |%d|",giveplayerid, sendername,PlayerInfo[giveplayerid][pPnumber]); SendClientMessage(playerid, COLOR_GRAD1, string); } } else { SendClientMessage(playerid, COLOR_GRAD1, " Jogador nгo exite !"); } } else { SendClientMessage(playerid, COLOR_GRAD1, " Vocк nгo tem uma Agenda.Compre uma nas lojas 24-7 !"); } } return 1; } |
Default Re: [Ajuda] Por o numero do cel ao lado do /lideres no format,adicione um %d,e nas funзoes,coloque um "PlayerInfo[i][pNumber]"...Acredito que seja essa variavel. __________________ |
if(PlayerInfo[i][pLeader] == 1){GetPlayerName(i, sendername, sizeof(sendername));format(string, 256, "Policia Militar: %s celular: %d", sendername, PlayerInfo[i][pPnumber]);SendClientMessage(playerid, BLUE, string);}
if(strcmp(cmd, "/darlider", true) == 0)
{
  if(IsPlayerConnected(playerid))
  {
    tmp = strtok(cmdtext, idx);
    if(!strlen(tmp))
    { Â
      SendClientMessage(playerid, COLOR_GRAD2, "USO: /darlider [playerid/Parte-do-Nick] [Number(1-17)]");
      return 1;
    }
    new para1;
    new level;
    para1 = ReturnUser(tmp);
    tmp = strtok(cmdtext, idx);
    level = strval(tmp);
    if(level > 22 || level < 0) { SendClientMessage(playerid, COLOR_GREY, " Nъmeros entre 1 e 21"); return 1; }
    if (PlayerInfo[playerid][pAdmin] >= 4)
    {
      if(IsPlayerConnected(para1))
      {
        if(para1 != INVALID_PLAYER_ID)
        {
          GetPlayerName(para1, giveplayer, sizeof(giveplayer));
          GetPlayerName(playerid, sendername, sizeof(sendername));
          PlayerInfo[para1][pLeader] = level;
          format(string, sizeof(string), "%s lhe deu o direito administraзгo profissional, digite /rg.", sendername);
          SendClientMessage(para1, COLOR_LIGHTBLUE, string);
          format(string, sizeof(string), "%s й o novo lнder administrativo profissional (%d).", giveplayer,level);
          SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
          if(level == 0) { PlayerInfo[para1][pChar] = 23; }
          else if(level == 1) { PlayerInfo[para1][pChar] = 265; gTeam[para1] = 2; } //Police Force
          else if(level == 2) { PlayerInfo[para1][pChar] = 286; gTeam[para1] = 2; } //FBI/ATF
          else if(level == 3) { PlayerInfo[para1][pChar] = 287; gTeam[para1] = 2;} //National Guard
          else if(level == 4) { PlayerInfo[para1][pChar] = 70; gTeam[para1] = 4;} //Fire/Ambulance
          else if(level == 5) { PlayerInfo[para1][pChar] = 104; gTeam[para1] = 7;} //Ballas
          else if(level == 6) { PlayerInfo[para1][pChar] = 270; gTeam[para1] = 7;} //Grove
          else if(level == 7) { PlayerInfo[para1][pChar] = 147; gTeam[para1] = 8;} //prefeito
          else if(level == { PlayerInfo[para1][pChar] = 165; gTeam[para1] = 8;} //M.I.
          else if(level == 9) { PlayerInfo[para1][pChar] = 295; gTeam[para1] = 9;} //News Reporters
          else if(level == 10) { PlayerInfo[para1][pChar] = 47; gTeam[para1] = 47;} //ggc
          else if(level == 12) { PlayerInfo[para1][pChar] = 108; gTeam[para1] = 7;} //Los Santos Vagos
          else if(level == 13) { PlayerInfo[para1][pChar] = 181; gTeam[para1] = 7;} //motoqueiros
          else if(level == 14) { PlayerInfo[para1][pChar] = 124; gTeam[para1] = 14;} //motoqueiros
          else if(level == 15) { PlayerInfo[para1][pChar] = 115; gTeam[para1] = 7; } //Aztecas
          else if(level == 16) { PlayerInfo[para1][pChar] = 118; gTeam[para1] = 16; } //Mafia
          else if(level == 17) { PlayerInfo[para1][pChar] = 294; gTeam[para1] = 16; } //Milicia
          else if(level == 1 { PlayerInfo[para1][pChar] = 292; gTeam[para1] = 16; } //Drifters
          else if(level == 19) { PlayerInfo[para1][pChar] = 19; gTeam[para1] = 16; } //Lowriders
          else if(level == 20) { PlayerInfo[para1][pChar] = 293; gTeam[para1] = 16; } //Lowriders
          else if(level == 21) { PlayerInfo[para1][pChar] = 285; gTeam[para1] = 21; } //swat
          else if(level == 22) { PlayerInfo[para1][pChar] = 290; gTeam[para1] = 22; } //swat
          PlayerInfo[para1][pMember] = level;
          PlayerInfo[para1][pRank] = 6;
          PlayerInfo[para1][pTeam] = gTeam[para1];
          PlayerInfo[para1][pModel] = PlayerInfo[para1][pChar];
          SetPlayerSkin(para1, PlayerInfo[para1][pChar]);
          format(string,sizeof(string),"O Admin %s deu lider para %s", sendername, giveplayer);
          SendClientMessageToAll(-1, string);
        }
      }//not connected
    }
    else
    {
      SendClientMessage(playerid, COLOR_GRAD1, " Sem Autorizaзгo.");
    }
  }
  return 1;
}