[ajuda]/admins por dialog
#1

eu dou /admins mais sу estб aparecendo 1 admin na dialog ;s
sempre fica na dialog o ultimo adm que entra no server.

Код:
COMMAND:admins(playerid, params[])
{
    new s[128];
    new ss[128];
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(PlayerInfo[i][pAdmin] > 0)
        {
            GetPlayerName(i, Jogador, sizeof(Jogador));
            format(s, 128, "{FFFFFF}%s {FF00FF}[%s]", Jogador, admins(i));
            strcat(s, ss, sizeof(s));
        }
    }
    ShowPlayerDialog(playerid, DIALOG_Admins, DIALOG_STYLE_MSGBOX, " {FF00FF}*** {FFFFFF}ADMIN'S ONLINE {FF00FF}***", s, "fechar", "");
    return true;
}
Код:
admins(playerid)
{
    new String[64];
    if(PlayerInfo[id][pAdmin] == 1)
        String = "Moderador";
    else if(PlayerInfo[playerid][pAdmin] == 2)
        String = "NНVEL 2";
    else if(PlayerInfo[playerid][pAdmin] == 3)
        String = "NНVEL 3";
    else if(PlayerInfo[playerid][pAdmin] == 4)
        String = "NНVEL 4";
    else if(PlayerInfo[playerid][pAdmin] == 5)
        String = "NНVEL 5";
    return String;
}
Reply
#2

aumenta o nuero da tring coloca 256
Reply
#3

Quote:
Originally Posted by kinhobryant
Посмотреть сообщение
aumenta o nuero da tring coloca 256
Feito e nгo resolvido, valeu por tentar ajudar!
Reply
#4

PHP код:
COMMAND:admins(playeridparams[])
{
    new 
sprimaria[128];
    new 
ssecundaria[400];
    for(new 
0MAX_PLAYERSi++)
    {
        if(
PlayerInfo[i][pAdmin] > 0)
        {
            
GetPlayerName(iJogadorsizeof(Jogador));
            
format(sprimaria128"{FFFFFF}%s {FF00FF}[%s]"Jogadoradmins(i));//24 + 10 +- 34 por admin supondo 10 adimns on 340
        
}
    }
    
ShowPlayerDialog(playeridDIALOG_AdminsDIALOG_STYLE_MSGBOX" {FF00FF}*** {FFFFFF}ADMIN'S ONLINE {FF00FF}***"ssecundaria"fechar""");
    return 
true;

Reply
#5

Tenta
pawn Код:
if(PlayerInfo[i][pAdmin] >= 1)
Reply
#6

strcat o primeiro parametro й o destino!
pawn Код:
COMMAND:admins(playerid, params[])
{
    new s[128], ss[128];
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(PlayerInfo[i][pAdmin] > 0)
        {
            GetPlayerName(i, Jogador, sizeof(Jogador));
            format(ss, 128, "{FFFFFF}%s {FF00FF}[%s]", Jogador, admins(i));
            strcat(s, ss);
        }
    }
    ShowPlayerDialog(playerid, DIALOG_Admins, DIALOG_STYLE_MSGBOX, " {FF00FF}*** {FFFFFF}ADMIN'S ONLINE {FF00FF}***", s, "fechar", "");
    return true;
}
Reply
#7

Quote:
Originally Posted by paulor
Посмотреть сообщение
strcat o primeiro parametro й o destino!
pawn Код:
COMMAND:admins(playerid, params[])
{
    new s[128], ss[128];
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(PlayerInfo[i][pAdmin] > 0)
        {
            GetPlayerName(i, Jogador, sizeof(Jogador));
            format(ss, 128, "{FFFFFF}%s {FF00FF}[%s]", Jogador, admins(i));
            strcat(s, ss);
        }
    }
    ShowPlayerDialog(playerid, DIALOG_Admins, DIALOG_STYLE_MSGBOX, " {FF00FF}*** {FFFFFF}ADMIN'S ONLINE {FF00FF}***", s, "fechar", "");
    return true;
}
Obg Paulor, +rep
Reply
#8

Nds...
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)