Dialog Format problem
#2

Код:
if(strcmp(cmd, "/leaders",true)==0) 
    { 
        if(IsPlayerConnected(playerid)) 
        { 
              for(new i = 0; i < MAX_PLAYERS; i++) 
            { 
                  if(IsPlayerConnected(i)) 
                { 
                    if(PlayerInfo[i][pMember] != TEAM_CIVILIAN && PlayerInfo[i][pRank] == 6 && PlayerInfo[i][pGL] == 0) 
                    { 
                        format(string, sizeof(string), "%s{33CCFF}Leader: %s On Band/Mafia - {E59305}%s\n",string, PlayerName(i), TeamInfo[PlayerInfo[i][pMember]][TeamName]); 
                    } 
                    if(PlayerInfo[i][pMember] != TEAM_CIVILIAN && PlayerInfo[i][pRank] == 6 && PlayerInfo[i][pGL] == 1) 
                    { 
                        format(string2, sizeof(string2), "%s{33CCFF}Head Leader: %s On Band/Mafia - {E59305}%s\n",string2, PlayerName(i), TeamInfo[PlayerInfo[i][pMember]][TeamName]); 
                    } 
                    if(PlayerInfo[i][pMember] != TEAM_CIVILIAN && PlayerInfo[i][pRank] == 7) 
                    { 
                        format(string3, sizeof(string3), "%s{33CCFF}Co Leader: %s On Band/Mafia - {E59305}%s\n",string3, PlayerName(i), TeamInfo[PlayerInfo[i][pMember]][TeamName]); 
                    } 
                } 
            } 
            format(string4, sizeof(string4), "%s%s%s" ,string,string2,string3); 
            ShowPlayerDialog(playerid, BAND1, DIALOG_STYLE_MSGBOX, "Online leaders on band/mafia:", string4, "Close", ""); 
        } 
        return 1; 
    } 
//
EDIT: also add try to use a bigger string4 (new string4[2000] or something like that) if you didn't already
Reply


Messages In This Thread
Dialog Format problem - by rumen98 - 29.07.2015, 18:45
Re: Dialog Format problem - by Battlezone - 29.07.2015, 18:52
Re: Dialog Format problem - by rumen98 - 29.07.2015, 19:10
AW: Dialog Format problem - by Mencent - 29.07.2015, 21:08

Forum Jump:


Users browsing this thread: 1 Guest(s)