SA-MP Forums Archive
[Ajuda] Comando Ver Admins online - 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] Comando Ver Admins online (/showthread.php?tid=457451)



Comando Ver Admins online - Marcinho - 11.08.2013

Eae Pessoal do Forum samp, Estou com um problema um tando quanto simples, porйm nгo consigo arrumar

Quando tem Muito Admin online, o Comando /admin corta em um determinado lugar

>por Exemplo<
Dono: Fulando
Admininistrador: Fulano
Sub-Dono: Fulano
Dono:


E Entгo Corta

O Comando й Este:


pawn Код:
if(strcmp("/admins", cmdtext, true, 10) == 0)
{
new count=0;
{
new adminstring[128];
if(IsPlayerConnected(playerid))
{
for (new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(pAdmin[i] > 0)
if(pAdmin[i] < 10)
{
format(adminstring, sizeof(adminstring),"%s%s - %s\n", adminstring, GetAdminName(i), PlayerName(i));
ShowPlayerDialog(playerid,2563,DIALOG_STYLE_MSGBOX,"Administradores Online",adminstring,"OK","");
count++;
}
}
}
}
if(count == 0)
{
ShowPlayerDialog(playerid,2563, DIALOG_STYLE_MSGBOX, "Administradores Online", "\n  (ERRO) Nгo hб administradores online no momento  \n", "OK", "SAIR");
}
return 1;
}
}



Re: Comando Ver Admins online - Diogo123 - 11.08.2013

Aumente o tamanho da new adminstring de [128] para [500]


Respuesta: Comando Ver Admins online - ViniKuliveguisky - 11.08.2013

pawn Код:
if (strcmp("/admins", cmdtext, true, 10) == 0)
{
    new count = 0;
    {
        new adminstring[600];
        if (IsPlayerConnected(playerid))
        {
            for (new i = 0; i < MAX_PLAYERS; i++)
            {
                if (IsPlayerConnected(i))
                {
                    if (pAdmin[i] > 0) if (pAdmin[i] < 10)
                    {
                        format(adminstring, sizeof(adminstring), "%s%s - %s\n", adminstring, GetAdminName(i), PlayerName(i));
                        ShowPlayerDialog(playerid, 2563, DIALOG_STYLE_MSGBOX, "Administradores Online", adminstring, "OK", "");
                        count++;
                    }
                }
            }
        }
        if (count == 0)
        {
            ShowPlayerDialog(playerid, 2563, DIALOG_STYLE_MSGBOX, "Administradores Online", "\n  (ERRO) Nгo hб administradores online no momento  \n", "OK", "SAIR");
        }
        return 1;
    }
}
Crйditos: Diogo123 e eu ^^


Re: Comando Ver Admins online - Marcinho - 11.08.2013

Vlw pessoal vo testar