Portal SAMP
[Ajuda] Ajudinha com /staff - Versão de Impressão

+- Portal SAMP (https://portalsamp.com)
+-- Fórum: SA-MP (https://portalsamp.com/forumdisplay.php?fid=5)
+--- Fórum: Área de suporte (https://portalsamp.com/forumdisplay.php?fid=6)
+--- Tópico: [Ajuda] Ajudinha com /staff (/showthread.php?tid=375)



Ajudinha com /staff - iDouK - 24/11/2020

Saca, fiz uma msgbox, pra mostrar os membros online de cada cargo, porem ela duplica a format quando tem mais de um jogador, ja conseguir colocar pra n duplicar, porem n consegui colocar pra ela da mais uma format pro outro jogador, ai só fica com o jogador do ID maior aparecendo, da uma ajuda pfv, ja tentei de toda forma e n consegui...
Prints,
Com um jogador:
[url=[Imagem: com_110.png]]Link[/url]
Quando tem 2 da staff conectados:
Link2


O CMD:
Código:
CMD:staff(playerid, params[]) {
    //BloqueioComandos(playerid);
    new count = 0, stg[3000], string[600];
    for(new idp=0; idp <= GetPlayerPoolSize(); idp++) {
        //-INICIO
        //- DIRETORES
        format(string, sizeof(string), "{5E0000}Diretores Conectados:"); strcat(stg, string);
        if(PlayerLogado[idp] == true && DiretorLogado[idp] == true) {
            format(string, sizeof(string), "\n{5E0000}» {FFFFFF}%s {5E0000}- ({FFFFFF}%d{5E0000})", PlayerInfo[idp][PlayerNick], idp); strcat(stg, string);
            count++;
        } else {
            format(string, sizeof(string), "\n{5E0000}• {FFFFFF}Nenhum diretor disponível no momento!"); strcat(stg, string);
        }
        //- ADMINISTRADORES
        format(string, sizeof(string), "\n\n\n{2587CE}Administradores Conectados:"); strcat(stg, string);
        if(PlayerLogado[idp] == true && AdministradorLogado[idp] == true) {
            format(string, sizeof(string), "\n{2587CE}» {FFFFFF}%s {2587CE}- ({FFFFFF}%d{2587CE})", PlayerInfo[idp][PlayerNick], idp); strcat(stg, string);
            count++;
        } else {
            format(string, sizeof(string), "\n{2587CE}• {FFFFFF}Nenhum administrador disponível no momento!"); strcat(stg, string);
        }
        //- MODERADORES
        format(string, sizeof(string), "\n\n\n{70B835}Moderadores Conectados:"); strcat(stg, string);
        if(PlayerLogado[idp] == true && PlayerInfo[idp][PlayerModerador] == 1) {
            format(string, sizeof(string), "\n{70B835}» {FFFFFF}%s {70B835}- ({FFFFFF}%d{70B835})", PlayerInfo[idp][PlayerNick], idp); strcat(stg, string);
            count++;
        } else {
            format(string, sizeof(string), "\n{70B835}• {FFFFFF}Nenhum moderador disponível no momento!"); strcat(stg, string);
        }
        //- AJUDANTES
        format(string, sizeof(string), "\n\n\n{9955DE}Ajudantes Conectados:"); strcat(stg, string);
        if(PlayerLogado[idp] == true && PlayerInfo[idp][PlayerAjudante] == 1) {
            format(string, sizeof(string), "\n{9955DE}» {FFFFFF}%s {9955DE}- ({FFFFFF}%d{9955DE})", PlayerInfo[idp][PlayerNick], idp); strcat(stg, string);
            count++;
        } else {
            format(string, sizeof(string), "\n{9955DE}• {FFFFFF}Nenhum ajudante disponível no momento!"); strcat(stg, string);
        }
        //-FIM
    }
    ShowPlayerDialog(playerid, DIALOG_STAFF, DIALOG_STYLE_MSGBOX, "                      {b01a00}Staff's Conectados", stg, "Ok", "");
    return 1;
}

Se puderem me dar uma força obg, ou se tiver um feito eu puder vê pra tirar a ideia pra fazer o meu, boa noite.