[Ajuda] /admins
#1

Bom eu criei um comando admins e tals Mas tipo ,Quando o player digita /admins O admin que tipo logou primeiro esta la em cima nгo importa se ele for cargo alto ou cargo baixo eu queria botar pro cargo mais alto ficar em cima mas eu nгo sei como irei fazer oque eu posso fazer

Aqui esta meu comando /admins

pawn Код:
dcmd_admins(playerid, params[])
 {
     #pragma unused params

  SendClientMessage(playerid, COLOR_ORANGE, "administracгo presentes:");
  for(new i = 0; i <= HighestID; i++)
  {
 
   if(IsPlayerConnected(i))
   {

     if(Player[i][pAdmin] == 1)
       {
        if(AdminAfk[i] == 1)
     {
      format(thestring, 128, "*** %s (Helper)  >> AFK", Player[i][pName]);
      SendClientMessage(playerid, 0x00FFFFFF, thestring);
     }
     else if(AdminDuty[i] == 1)
     {
      format(thestring, 128, "*** %s (Helper)  >> Trabalhando", Player[i][pName]);
      SendClientMessage(playerid, 0x00FFFFFF, thestring);
     }
                    else if(noevento[i] == true)
     {
      format(thestring, 128, "*** %s (Helper)  >> Em evento", Player[i][pName]);
      SendClientMessage(playerid, 0x00FFFFFF, thestring);
     }
                    else if(noteste[i] == true)
     {
      format(thestring, 128, "*** %s (Helper)  >> Em teste", Player[i][pName]);
      SendClientMessage(playerid, 0x00FFFFFF, thestring);
     }
     else if(AdminDuty[i] == 0 && AdminAfk[i] == 0)
     {
      format(thestring, 128, "*** %s (Helper)  ", Player[i][pName]);
      SendClientMessage(playerid, 0x00FFFFFF, thestring);
     }
    }


  if(Player[i][pAdmin] == 2)
       {
        if(AdminAfk[i] == 1)
     {
      format(thestring, 128, "*** %s (Aprendiz)  >> AFK", Player[i][pName]);
      SendClientMessage(playerid, 0x7CFC00FF, thestring);
     }
     else if(AdminDuty[i] == 1)
     {
      format(thestring, 128, "*** %s (Aprendiz)  >> Trabalhando", Player[i][pName]);
      SendClientMessage(playerid, 0x7CFC00FF, thestring);
     }
                    else if(noevento[i] == true)
     {
      format(thestring, 128, "*** %s (Aprendiz)  >> Em evento", Player[i][pName]);
      SendClientMessage(playerid, 0x7CFC00FF, thestring);
     }
                    else if(noteste[i] == true)
     {
      format(thestring, 128, "*** %s (Aprendiz)  >> Em teste", Player[i][pName]);
      SendClientMessage(playerid, 0x7CFC00FF, thestring);
     }
     else if(AdminDuty[i] == 0 && AdminAfk[i] == 0)
     {
      format(thestring, 128, "*** %s (Aprendiz)  ", Player[i][pName]);
      SendClientMessage(playerid, 0x7CFC00FF, thestring);
     }
    }


 if(Player[i][pAdmin] == 3)
       {
        if(AdminAfk[i] == 1)
     {
      format(thestring, 128, "*** %s (Moderador)  >> AFK", Player[i][pName]);
      SendClientMessage(playerid, 0x7D26CDFF, thestring);
     }
     else if(AdminDuty[i] == 1)
     {
      format(thestring, 128, "*** %s (Moderador)  >> Trabalhando", Player[i][pName]);
      SendClientMessage(playerid, 0x7D26CDFF, thestring);
     }
                    else if(noevento[i] == true)
     {
      format(thestring, 128, "*** %s (Moderador)  >> Em evento", Player[i][pName]);
      SendClientMessage(playerid, 0x7D26CDFF, thestring);
     }
                    else if(noteste[i] == true)
     {
      format(thestring, 128, "*** %s (Moderador)  >> Em teste", Player[i][pName]);
      SendClientMessage(playerid, 0x7D26CDFF, thestring);
     }
     else if(AdminDuty[i] == 0 && AdminAfk[i] == 0)
     {
      format(thestring, 128, "*** %s (Moderador)  ", Player[i][pName]);
      SendClientMessage(playerid, 0x7D26CDFF, thestring);
     }
    }


 if(Player[i][pAdmin] == 4)
       {
        if(AdminAfk[i] == 1)
     {
      format(thestring, 128, "*** %s (Super-Moderador)  >> AFK", Player[i][pName]);
      SendClientMessage(playerid, 0x98F5FFFF, thestring);
     }
     else if(AdminDuty[i] == 1)
     {
      format(thestring, 128, "*** %s (Super-Moderador)  >> Trabalhando", Player[i][pName]);
      SendClientMessage(playerid, 0x98F5FFFF, thestring);
     }
                    else if(noevento[i] == true)
     {
      format(thestring, 128, "*** %s (Super-Moderador)  >> Em evento", Player[i][pName]);
      SendClientMessage(playerid, 0x98F5FFFF, thestring);
     }
                    else if(noteste[i] == true)
     {
      format(thestring, 128, "*** %s (Super-Moderador)  >> Em teste", Player[i][pName]);
      SendClientMessage(playerid, 0x98F5FFFF, thestring);
     }
     else if(AdminDuty[i] == 0 && AdminAfk[i] == 0)
     {
      format(thestring, 128, "*** %s (Super-Moderador)  ", Player[i][pName]);
      SendClientMessage(playerid, 0x98F5FFFF, thestring);
     }
    }


 if(Player[i][pAdmin] == 5)
       {
        if(AdminAfk[i] == 1)
     {
      format(thestring, 128, "*** %s (Administrador)  >> AFK", Player[i][pName]);
      SendClientMessage(playerid, 0xFFFF00FF, thestring);
     }
     else if(AdminDuty[i] == 1)
     {
      format(thestring, 128, "*** %s (Administrador)  >> Trabalhando", Player[i][pName]);
      SendClientMessage(playerid, 0xFFFF00FF, thestring);
     }
                    else if(noevento[i] == true)
     {
      format(thestring, 128, "*** %s (Administrador)  >> Em evento", Player[i][pName]);
      SendClientMessage(playerid, 0xFFFF00FF, thestring);
     }
                    else if(noteste[i] == true)
     {
      format(thestring, 128, "*** %s (Administrador)  >> Em teste", Player[i][pName]);
      SendClientMessage(playerid, 0xFFFF00FF, thestring);
     }
     else if(AdminDuty[i] == 0 && AdminAfk[i] == 0)
     {
      format(thestring, 128, "*** %s (Administrador)  ", Player[i][pName]);
      SendClientMessage(playerid, 0xFFFF00FF, thestring);
     }
    }


 if(Player[i][pAdmin] == 6)
       {
        if(AdminAfk[i] == 1)
     {
      format(thestring, 128, "*** %s (Supervisor)  >> AFK", Player[i][pName]);
      SendClientMessage(playerid, 0xFFA07AFF, thestring);
     }
     else if(AdminDuty[i] == 1)
     {
      format(thestring, 128, "*** %s (Supervisor)  >> Trabalhando", Player[i][pName]);
      SendClientMessage(playerid, 0xFFA07AFF, thestring);
     }
                    else if(noevento[i] == true)
     {
      format(thestring, 128, "*** %s (Supervisor)  >> Em evento", Player[i][pName]);
      SendClientMessage(playerid, 0xFFA07AFF, thestring);
     }
                    else if(noteste[i] == true)
     {
      format(thestring, 128, "*** %s (Supervisor)  >>  Em teste", Player[i][pName]);
      SendClientMessage(playerid, 0xFFA07AFF, thestring);
     }
     else if(AdminDuty[i] == 0 && AdminAfk[i] == 0)
     {
      format(thestring, 128, "*** %s (Supervisor)  ", Player[i][pName]);
      SendClientMessage(playerid, 0xFFA07AFF, thestring);
     }
    }


 if(Player[i][pAdmin] == 7)
       {
        if(AdminAfk[i] == 1)
     {
      format(thestring, 128, "*** %s (Organizador)  >> AFK", Player[i][pName]);
      SendClientMessage(playerid, 0xFF6A6AFF, thestring);
     }
     else if(AdminDuty[i] == 1)
     {
      format(thestring, 128, "*** %s (Organizador)  >> Trabalhando", Player[i][pName]);
      SendClientMessage(playerid, 0xFF6A6AFF, thestring);
     }
                    else if(noevento[i] == true)
     {
      format(thestring, 128, "*** %s (Organizador)  >> Em evento", Player[i][pName]);
      SendClientMessage(playerid, 0xFF6A6AFF, thestring);
     }
                    else if(noteste[i] == true)
     {
      format(thestring, 128, "*** %s (Organizador)  >> Em teste" ,Player[i][pName]);
      SendClientMessage(playerid, 0xFF6A6AFF, thestring);
     }
     else if(AdminDuty[i] == 0 && AdminAfk[i] == 0)
     {
      format(thestring, 128, "*** %s (Organizador)  " ,Player[i][pName]);
      SendClientMessage(playerid, 0xFF6A6AFF, thestring);
     }
    }



   }
  }
  return 1;
 }
Reply
#2

Inverta as ordens, comeзando pelo maior pro menor (decrescente).
Reply
#3

Continua man ,ele й por id eu acho ,eu quero botar por cargos
Reply
#4

eu encontrei 4 bases para isso no ******, usa o search primeiro
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)