[Ajuda] /lideres para diбlogo
#1

Como eu faзo para esse comando aparecer em diбlogo? tipo , nome dos lнderes um abaixo do outro

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

        SendClientMessage(playerid, COLOR_YELLOW, "|-Free Halls lideres presentes-|");
        for(new i = 0; i <= HighestID; i++)
        {
            if(IsPlayerConnected(i))
            {
                if(Player[i][pAdmin] < 7)
                {
                    if(Player[i][pLeader] == TEAM_PM){format(thestring, 128, "(%d)Policia Militar: %s | Contato: %d", i, Player[i][pName], Player[i][pPnumber]);SendClientMessage(playerid, COLOR_PM, thestring);}
                    if(Player[i][pLeader] == TEAM_PF){format(thestring, 128, "(%d)Policia Federal: %s | Contato: %d", i, Player[i][pName], Player[i][pPnumber]);SendClientMessage(playerid, COLOR_PF, thestring);}
                    if(Player[i][pLeader] == TEAM_FA){format(thestring, 128, "(%d)Forcas Armadas: %s | Contato: %d", i, Player[i][pName], Player[i][pPnumber]);SendClientMessage(playerid, COLOR_FA, thestring);}
                    if(Player[i][pLeader] == TEAM_BOMBE){format(thestring, 128, "(%d)Bombeiros: %s | Contato: %d", i, Player[i][pName], Player[i][pPnumber]);SendClientMessage(playerid, COLOR_MEDICOS, thestring);}
                    if(Player[i][pLeader] == TEAM_BALLAS){format(thestring, 128, "(%d)Front Yard Ballas: %s | Contato: %d", i, Player[i][pName], Player[i][pPnumber]);SendClientMessage(playerid, COLOR_BALLAS, thestring);}
                    if(Player[i][pLeader] == TEAM_GROOVE){format(thestring, 128, "(%d)Grove Street Families: %s | Contato: %d", i, Player[i][pName], Player[i][pPnumber]);SendClientMessage(playerid, COLOR_GROOVE, thestring);}
                    if(Player[i][pLeader] == TEAM_PREF){format(thestring, 128, "(%d)Prefeito: %s | Contato: %d", i, Player[i][pName], Player[i][pPnumber]);SendClientMessage(playerid, COLOR_PREF, thestring);}
                    if(Player[i][pLeader] == TEAM_HITMAN){format(thestring, 128, "(%d)Hitman: %s | Contato: %d", i, Player[i][pName], Player[i][pPnumber]);SendClientMessage(playerid, COLOR_HITMAN, thestring);}
                    if(Player[i][pLeader] == TEAM_SANEWS){format(thestring, 128, "(%d)Reporter: %s | Contato: %d", i, Player[i][pName], Player[i][pPnumber]);SendClientMessage(playerid, COLOR_SANEWS, thestring);}
                    if(Player[i][pLeader] == TEAM_LOWRIDERS){format(thestring, 128, "(%d)Lowrider: %s | Contato: %d", i, Player[i][pName], Player[i][pPnumber]);SendClientMessage(playerid, COLOR_LOWRIDERS, thestring);}
                    if(Player[i][pLeader] == TEAM_VAGOS){format(thestring, 128, "(%d)Los Santos Vagos: %s | Contato: %d", i, Player[i][pName], Player[i][pPnumber]);SendClientMessage(playerid, COLOR_VAGOS, thestring);}
                    if(Player[i][pLeader] == TEAM_BIKERS){format(thestring, 128, "(%d)MotorBikers: %s | Contato: %d", i, Player[i][pName], Player[i][pPnumber]);SendClientMessage(playerid, COLOR_BIKERS, thestring);}
                    if(Player[i][pLeader] == TEAM_MUNICIPAL){format(thestring, 128, "(%d)Guarda Municipal: %s | Contato: %d.", i, Player[i][pName], Player[i][pPnumber]);SendClientMessage(playerid, COLOR_MUNICIPAL, thestring);}
                    if(Player[i][pLeader] == TEAM_AZTECAS){format(thestring, 128, "(%d)Varrio Los Aztecas: %s | Contato: %d", i, Player[i][pName], Player[i][pPnumber]);SendClientMessage(playerid, COLOR_AZTECAS, thestring);}
                    if(Player[i][pLeader] == TEAM_RUSSA){format(thestring, 128, "(%d)Mбfia Russa: %s | Contato: %d", i, Player[i][pName], Player[i][pPnumber]);SendClientMessage(playerid, COLOR_RUSSA, thestring);}
                    if(Player[i][pLeader] == TEAM_YAKUZA){format(thestring, 128, "(%d)Mafia Yakuza: %s | Contato: %d", i, Player[i][pName], Player[i][pPnumber]);SendClientMessage(playerid, COLOR_YAKUZA, thestring);}
                    if(Player[i][pLeader] == TEAM_DRIFTERS){format(thestring, 128, "(%d)Drifters: %s | Contato: %d", i, Player[i][pName], Player[i][pPnumber]);SendClientMessage(playerid, COLOR_DRIFTERS, thestring);}
                    if(Player[i][pLeader] == TEAM_BLOODS){format(thestring, 128, "(%d)Bloods: %s | Contato: %d", i, Player[i][pName], Player[i][pPnumber]);SendClientMessage(playerid, COLOR_BLOODS, thestring);}
                    if(Player[i][pLeader] == TEAM_CREEPS){format(thestring, 128, "(%d)Creeps: %s | Contato: %d", i, Player[i][pName], Player[i][pPnumber]);SendClientMessage(playerid, COLOR_CREEPS, thestring);}
                    if(Player[i][pLeader] == TEAM_BOPE){format(thestring, 128, "(%d)BOPE: %s | Contato: %d", i, Player[i][pName], Player[i][pPnumber]);SendClientMessage(playerid, COLOR_BOPE, thestring);}
                    if(Player[i][pLeader] == TEAM_ALQAEDA){format(thestring, 128, "(%d)Al-Qaeda: %s | Contato: %d", i, Player[i][pName], Player[i][pPnumber]);SendClientMessage(playerid, COLOR_ALQAEDA, thestring);}
                    if(Player[i][pLeader] == TEAM_KINGS){format(thestring, 128, "(%d)King's: %s | Contato: %d", i, Player[i][pName], Player[i][pPnumber]);SendClientMessage(playerid, COLOR_KINGS, thestring);}
                }
            }
        }
        return 1;
    }
Reply
#2

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

        SendClientMessage(playerid, COLOR_YELLOW, "|-Free Halls lideres presentes-|");
        for(new i = 0; i <= HighestID; i++)
        {
            if(IsPlayerConnected(i))
            {
                if(Player[i][pAdmin] < 7)
                {
                    if(Player[i][pLeader] == TEAM_PM){format(thestring, 128, "(%d)Policia Militar: %s | Contato: %d", i, Player[i][pName], Player[i][pPnumber]);SendClientMessage(playerid, COLOR_PM, thestring);}
                    if(Player[i][pLeader] == TEAM_PF){format(thestring, 128, "(%d)Policia Federal: %s | Contato: %d", i, Player[i][pName], Player[i][pPnumber]);SendClientMessage(playerid, COLOR_PF, thestring);}
                    if(Player[i][pLeader] == TEAM_FA){format(thestring, 128, "(%d)Forcas Armadas: %s | Contato: %d", i, Player[i][pName], Player[i][pPnumber]);SendClientMessage(playerid, COLOR_FA, thestring);}
                    if(Player[i][pLeader] == TEAM_BOMBE){format(thestring, 128, "(%d)Bombeiros: %s | Contato: %d", i, Player[i][pName], Player[i][pPnumber]);SendClientMessage(playerid, COLOR_MEDICOS, thestring);}
                    if(Player[i][pLeader] == TEAM_BALLAS){format(thestring, 128, "(%d)Front Yard Ballas: %s | Contato: %d", i, Player[i][pName], Player[i][pPnumber]);SendClientMessage(playerid, COLOR_BALLAS, thestring);}
                    if(Player[i][pLeader] == TEAM_GROOVE){format(thestring, 128, "(%d)Grove Street Families: %s | Contato: %d", i, Player[i][pName], Player[i][pPnumber]);SendClientMessage(playerid, COLOR_GROOVE, thestring);}
                    if(Player[i][pLeader] == TEAM_PREF){format(thestring, 128, "(%d)Prefeito: %s | Contato: %d", i, Player[i][pName], Player[i][pPnumber]);SendClientMessage(playerid, COLOR_PREF, thestring);}
                    if(Player[i][pLeader] == TEAM_HITMAN){format(thestring, 128, "(%d)Hitman: %s | Contato: %d", i, Player[i][pName], Player[i][pPnumber]);SendClientMessage(playerid, COLOR_HITMAN, thestring);}
                    if(Player[i][pLeader] == TEAM_SANEWS){format(thestring, 128, "(%d)Reporter: %s | Contato: %d", i, Player[i][pName], Player[i][pPnumber]);SendClientMessage(playerid, COLOR_SANEWS, thestring);}
                    if(Player[i][pLeader] == TEAM_LOWRIDERS){format(thestring, 128, "(%d)Lowrider: %s | Contato: %d", i, Player[i][pName], Player[i][pPnumber]);SendClientMessage(playerid, COLOR_LOWRIDERS, thestring);}
                    if(Player[i][pLeader] == TEAM_VAGOS){format(thestring, 128, "(%d)Los Santos Vagos: %s | Contato: %d", i, Player[i][pName], Player[i][pPnumber]);SendClientMessage(playerid, COLOR_VAGOS, thestring);}
                    if(Player[i][pLeader] == TEAM_BIKERS){format(thestring, 128, "(%d)MotorBikers: %s | Contato: %d", i, Player[i][pName], Player[i][pPnumber]);SendClientMessage(playerid, COLOR_BIKERS, thestring);}
                    if(Player[i][pLeader] == TEAM_MUNICIPAL){format(thestring, 128, "(%d)Guarda Municipal: %s | Contato: %d.", i, Player[i][pName], Player[i][pPnumber]);SendClientMessage(playerid, COLOR_MUNICIPAL, thestring);}
                    if(Player[i][pLeader] == TEAM_AZTECAS){format(thestring, 128, "(%d)Varrio Los Aztecas: %s | Contato: %d", i, Player[i][pName], Player[i][pPnumber]);SendClientMessage(playerid, COLOR_AZTECAS, thestring);}
                    if(Player[i][pLeader] == TEAM_RUSSA){format(thestring, 128, "(%d)Mбfia Russa: %s | Contato: %d", i, Player[i][pName], Player[i][pPnumber]);SendClientMessage(playerid, COLOR_RUSSA, thestring);}
                    if(Player[i][pLeader] == TEAM_YAKUZA){format(thestring, 128, "(%d)Mafia Yakuza: %s | Contato: %d", i, Player[i][pName], Player[i][pPnumber]);SendClientMessage(playerid, COLOR_YAKUZA, thestring);}
                    if(Player[i][pLeader] == TEAM_DRIFTERS){format(thestring, 128, "(%d)Drifters: %s | Contato: %d", i, Player[i][pName], Player[i][pPnumber]);SendClientMessage(playerid, COLOR_DRIFTERS, thestring);}
                    if(Player[i][pLeader] == TEAM_BLOODS){format(thestring, 128, "(%d)Bloods: %s | Contato: %d", i, Player[i][pName], Player[i][pPnumber]);SendClientMessage(playerid, COLOR_BLOODS, thestring);}
                    if(Player[i][pLeader] == TEAM_CREEPS){format(thestring, 128, "(%d)Creeps: %s | Contato: %d", i, Player[i][pName], Player[i][pPnumber]);SendClientMessage(playerid, COLOR_CREEPS, thestring);}
                    if(Player[i][pLeader] == TEAM_BOPE){format(thestring, 128, "(%d)BOPE: %s | Contato: %d", i, Player[i][pName], Player[i][pPnumber]);SendClientMessage(playerid, COLOR_BOPE, thestring);}
                    if(Player[i][pLeader] == TEAM_ALQAEDA){format(thestring, 128, "(%d)Al-Qaeda: %s | Contato: %d", i, Player[i][pName], Player[i][pPnumber]);SendClientMessage(playerid, COLOR_ALQAEDA, thestring);}
                    if(Player[i][pLeader] == TEAM_KINGS){format(thestring, 128, "(%d)King's: %s | Contato: %d", i, Player[i][pName], Player[i][pPnumber]);SendClientMessage(playerid, COLOR_KINGS, thestring);}
ShowPlayerDialog ( playerid , 0 , DIALOG_STYLE_MSGBOX , ""0"Administradores Online:" , 1 , "Ok" , "Sair");
                }
            }
        }
        return 1;
    }
Reply
#3

Quote:
Originally Posted by Standby
Посмотреть сообщение
pawn Код:
dcmd_lideres(playerid, params[])
    {
        #pragma unused params

        SendClientMessage(playerid, COLOR_YELLOW, "|-Free Halls lideres presentes-|");
        for(new i = 0; i <= HighestID; i++)
        {
            if(IsPlayerConnected(i))
            {
                if(Player[i][pAdmin] < 7)
                {
                    if(Player[i][pLeader] == TEAM_PM){format(thestring, 128, "(%d)Policia Militar: %s | Contato: %d", i, Player[i][pName], Player[i][pPnumber]);SendClientMessage(playerid, COLOR_PM, thestring);}
                    if(Player[i][pLeader] == TEAM_PF){format(thestring, 128, "(%d)Policia Federal: %s | Contato: %d", i, Player[i][pName], Player[i][pPnumber]);SendClientMessage(playerid, COLOR_PF, thestring);}
                    if(Player[i][pLeader] == TEAM_FA){format(thestring, 128, "(%d)Forcas Armadas: %s | Contato: %d", i, Player[i][pName], Player[i][pPnumber]);SendClientMessage(playerid, COLOR_FA, thestring);}
                    if(Player[i][pLeader] == TEAM_BOMBE){format(thestring, 128, "(%d)Bombeiros: %s | Contato: %d", i, Player[i][pName], Player[i][pPnumber]);SendClientMessage(playerid, COLOR_MEDICOS, thestring);}
                    if(Player[i][pLeader] == TEAM_BALLAS){format(thestring, 128, "(%d)Front Yard Ballas: %s | Contato: %d", i, Player[i][pName], Player[i][pPnumber]);SendClientMessage(playerid, COLOR_BALLAS, thestring);}
                    if(Player[i][pLeader] == TEAM_GROOVE){format(thestring, 128, "(%d)Grove Street Families: %s | Contato: %d", i, Player[i][pName], Player[i][pPnumber]);SendClientMessage(playerid, COLOR_GROOVE, thestring);}
                    if(Player[i][pLeader] == TEAM_PREF){format(thestring, 128, "(%d)Prefeito: %s | Contato: %d", i, Player[i][pName], Player[i][pPnumber]);SendClientMessage(playerid, COLOR_PREF, thestring);}
                    if(Player[i][pLeader] == TEAM_HITMAN){format(thestring, 128, "(%d)Hitman: %s | Contato: %d", i, Player[i][pName], Player[i][pPnumber]);SendClientMessage(playerid, COLOR_HITMAN, thestring);}
                    if(Player[i][pLeader] == TEAM_SANEWS){format(thestring, 128, "(%d)Reporter: %s | Contato: %d", i, Player[i][pName], Player[i][pPnumber]);SendClientMessage(playerid, COLOR_SANEWS, thestring);}
                    if(Player[i][pLeader] == TEAM_LOWRIDERS){format(thestring, 128, "(%d)Lowrider: %s | Contato: %d", i, Player[i][pName], Player[i][pPnumber]);SendClientMessage(playerid, COLOR_LOWRIDERS, thestring);}
                    if(Player[i][pLeader] == TEAM_VAGOS){format(thestring, 128, "(%d)Los Santos Vagos: %s | Contato: %d", i, Player[i][pName], Player[i][pPnumber]);SendClientMessage(playerid, COLOR_VAGOS, thestring);}
                    if(Player[i][pLeader] == TEAM_BIKERS){format(thestring, 128, "(%d)MotorBikers: %s | Contato: %d", i, Player[i][pName], Player[i][pPnumber]);SendClientMessage(playerid, COLOR_BIKERS, thestring);}
                    if(Player[i][pLeader] == TEAM_MUNICIPAL){format(thestring, 128, "(%d)Guarda Municipal: %s | Contato: %d.", i, Player[i][pName], Player[i][pPnumber]);SendClientMessage(playerid, COLOR_MUNICIPAL, thestring);}
                    if(Player[i][pLeader] == TEAM_AZTECAS){format(thestring, 128, "(%d)Varrio Los Aztecas: %s | Contato: %d", i, Player[i][pName], Player[i][pPnumber]);SendClientMessage(playerid, COLOR_AZTECAS, thestring);}
                    if(Player[i][pLeader] == TEAM_RUSSA){format(thestring, 128, "(%d)Mбfia Russa: %s | Contato: %d", i, Player[i][pName], Player[i][pPnumber]);SendClientMessage(playerid, COLOR_RUSSA, thestring);}
                    if(Player[i][pLeader] == TEAM_YAKUZA){format(thestring, 128, "(%d)Mafia Yakuza: %s | Contato: %d", i, Player[i][pName], Player[i][pPnumber]);SendClientMessage(playerid, COLOR_YAKUZA, thestring);}
                    if(Player[i][pLeader] == TEAM_DRIFTERS){format(thestring, 128, "(%d)Drifters: %s | Contato: %d", i, Player[i][pName], Player[i][pPnumber]);SendClientMessage(playerid, COLOR_DRIFTERS, thestring);}
                    if(Player[i][pLeader] == TEAM_BLOODS){format(thestring, 128, "(%d)Bloods: %s | Contato: %d", i, Player[i][pName], Player[i][pPnumber]);SendClientMessage(playerid, COLOR_BLOODS, thestring);}
                    if(Player[i][pLeader] == TEAM_CREEPS){format(thestring, 128, "(%d)Creeps: %s | Contato: %d", i, Player[i][pName], Player[i][pPnumber]);SendClientMessage(playerid, COLOR_CREEPS, thestring);}
                    if(Player[i][pLeader] == TEAM_BOPE){format(thestring, 128, "(%d)BOPE: %s | Contato: %d", i, Player[i][pName], Player[i][pPnumber]);SendClientMessage(playerid, COLOR_BOPE, thestring);}
                    if(Player[i][pLeader] == TEAM_ALQAEDA){format(thestring, 128, "(%d)Al-Qaeda: %s | Contato: %d", i, Player[i][pName], Player[i][pPnumber]);SendClientMessage(playerid, COLOR_ALQAEDA, thestring);}
                    if(Player[i][pLeader] == TEAM_KINGS){format(thestring, 128, "(%d)King's: %s | Contato: %d", i, Player[i][pName], Player[i][pPnumber]);SendClientMessage(playerid, COLOR_KINGS, thestring);}
ShowPlayerDialog ( playerid , 0 , DIALOG_STYLE_MSGBOX , ""0"Administradores Online:" , 1 , "Ok" , "Sair");
                }
            }
        }
        return 1;
    }
completamente errado

pawn Код:
#define dialog_liders 123

dcmd_lideres(playerid, params[])
{
    #pragma unused params
    for(new i = 0; i <= HighestID; i++)
    {
        if(IsPlayerConnected(i))
        {
            if(Player[i][pAdmin] < 7)
            {
                new dlider[700];
                if(Player[i][pLeader] == TEAM_PM){format(thestring, 128, "(%d)Policia Militar: %s | Contato: %d", i, Player[i][pName], Player[i][pPnumber]); strcat(dlider, thestring);}
                if(Player[i][pLeader] == TEAM_PF){format(thestring, 128, "(%d)Policia Federal: %s | Contato: %d", i, Player[i][pName], Player[i][pPnumber]); strcat(dlider, thestring);}
                if(Player[i][pLeader] == TEAM_FA){format(thestring, 128, "(%d)Forcas Armadas: %s | Contato: %d", i, Player[i][pName], Player[i][pPnumber]); strcat(dlider, thestring);}
                if(Player[i][pLeader] == TEAM_BOMBE){format(thestring, 128, "(%d)Bombeiros: %s | Contato: %d", i, Player[i][pName], Player[i][pPnumber]); strcat(dlider, thestring);}
                if(Player[i][pLeader] == TEAM_BALLAS){format(thestring, 128, "(%d)Front Yard Ballas: %s | Contato: %d", i, Player[i][pName], Player[i][pPnumber]); strcat(dlider, thestring);}
                if(Player[i][pLeader] == TEAM_GROOVE){format(thestring, 128, "(%d)Grove Street Families: %s | Contato: %d", i, Player[i][pName], Player[i][pPnumber]); strcat(dlider, thestring);}
                if(Player[i][pLeader] == TEAM_PREF){format(thestring, 128, "(%d)Prefeito: %s | Contato: %d", i, Player[i][pName], Player[i][pPnumber]); strcat(dlider, thestring);}
                if(Player[i][pLeader] == TEAM_HITMAN){format(thestring, 128, "(%d)Hitman: %s | Contato: %d", i, Player[i][pName], Player[i][pPnumber]); strcat(dlider, thestring);}
                if(Player[i][pLeader] == TEAM_SANEWS){format(thestring, 128, "(%d)Reporter: %s | Contato: %d", i, Player[i][pName], Player[i][pPnumber]); strcat(dlider, thestring);}
                if(Player[i][pLeader] == TEAM_LOWRIDERS){format(thestring, 128, "(%d)Lowrider: %s | Contato: %d", i, Player[i][pName], Player[i][pPnumber]); strcat(dlider, thestring);}
                if(Player[i][pLeader] == TEAM_VAGOS){format(thestring, 128, "(%d)Los Santos Vagos: %s | Contato: %d", i, Player[i][pName], Player[i][pPnumber]); strcat(dlider, thestring);}
                if(Player[i][pLeader] == TEAM_BIKERS){format(thestring, 128, "(%d)MotorBikers: %s | Contato: %d", i, Player[i][pName], Player[i][pPnumber]); strcat(dlider, thestring);}
                if(Player[i][pLeader] == TEAM_MUNICIPAL){format(thestring, 128, "(%d)Guarda Municipal: %s | Contato: %d.", i, Player[i][pName], Player[i][pPnumber]); strcat(dlider, thestring);}
                if(Player[i][pLeader] == TEAM_AZTECAS){format(thestring, 128, "(%d)Varrio Los Aztecas: %s | Contato: %d", i, Player[i][pName], Player[i][pPnumber]); strcat(dlider, thestring);}
                if(Player[i][pLeader] == TEAM_RUSSA){format(thestring, 128, "(%d)Mбfia Russa: %s | Contato: %d", i, Player[i][pName], Player[i][pPnumber]); strcat(dlider, thestring);}
                if(Player[i][pLeader] == TEAM_YAKUZA){format(thestring, 128, "(%d)Mafia Yakuza: %s | Contato: %d", i, Player[i][pName], Player[i][pPnumber]); strcat(dlider, thestring);}
                if(Player[i][pLeader] == TEAM_DRIFTERS){format(thestring, 128, "(%d)Drifters: %s | Contato: %d", i, Player[i][pName], Player[i][pPnumber]); strcat(dlider, thestring);}
                if(Player[i][pLeader] == TEAM_BLOODS){format(thestring, 128, "(%d)Bloods: %s | Contato: %d", i, Player[i][pName], Player[i][pPnumber]); strcat(dlider, thestring);}
                if(Player[i][pLeader] == TEAM_CREEPS){format(thestring, 128, "(%d)Creeps: %s | Contato: %d", i, Player[i][pName], Player[i][pPnumber]); strcat(dlider, thestring);}
                if(Player[i][pLeader] == TEAM_BOPE){format(thestring, 128, "(%d)BOPE: %s | Contato: %d", i, Player[i][pName], Player[i][pPnumber]); strcat(dlider, thestring);}
                if(Player[i][pLeader] == TEAM_ALQAEDA){format(thestring, 128, "(%d)Al-Qaeda: %s | Contato: %d", i, Player[i][pName], Player[i][pPnumber]); strcat(dlider, thestring);}
                if(Player[i][pLeader] == TEAM_KINGS){format(thestring, 128, "(%d)King's: %s | Contato: %d", i, Player[i][pName], Player[i][pPnumber]); strcat(dlider, thestring);}
                ShowPlayerDialog ( playerid , dialog_liders , DIALOG_STYLE_MSGBOX , "|-Free Halls lideres presentes-|" , dlider , "Ok" , "Sair");
            }
        }
    }
    return 1;
}
Reply
#4

Perfeito, Obrigado PT
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)