[HELP]Guys Can you Mix Both the dialog into one?Please help brothers.
#1

SOLVED
Reply
#2

Test this
and if you have got any error show me
pawn Код:
CMD:gstats(playerid,params[])
{
new string[500], id;
sscanf(params, "u", id);
if (isnull(params))
{
format(string, sizeof(string), "{00FF00}%s\n\n{00FF00}General:\n\n{FFFFFF}Gang Id :\t%d\nGang Score :\t%d\nGangOwner :\t%s\n\n{00FF00}Online Members :\n%s\n%s - Level :: %d \n",Pinfo[playerid][gname],Pinfo[playerid][gid],Pinfo[playerid][gscore],Pinfo[playerid][gowner],GetName(i),PlayerInfo[i][glevel]);
return ShowPlayerDialog(playerid,9982,DIALOG_STYLE_MSGBOX,"Gang Stats.",string,"Ok","");
}
else if(IsPlayerConnected(id))
{
format(string, sizeof(string), "{00FF00}%s\n\n{00FF00}General:\n\n{FFFFFF}Gang Id :\t%d\nGang Score :\t%d\nGangOwner :\t%s\n\n{00FF00}Online Members :\n%s\n%s - Level :: %d \n",Pinfo[playerid][gname],Pinfo[id][gid],Pinfo[id][gscore],Pinfo[id][gowner],GetName(i),PlayerInfo[i][glevel]);
return ShowPlayerDialog(playerid,9982,DIALOG_STYLE_MSGBOX,"gang Stats.",string,"Ok","");
}
return 1;
}
Reply
#3

....
Reply
#4

*BUMP*
Try to solve anyone?
Reply
#5

....
Reply
#6

new string[300];
foreach(Player, i) {
if(PlayerInfo[playerid][gangid] == PlayerInfo[i][gangid]) {
format(string, sizeof string, "%s\n%s - Level :: %d", string, GetName(i), PlayerInfo[i][glevel]);
}
}
ShowPlayerdialog(9971, DIALOG_STYLE_MSGBOX, "Online Gang Members", string, "Ok", "");
Reply
#7

....
Reply
#8

Do you mean like this?
Код:
CMD:gstats(playerid,params[])
{
    new string[300], tempstr[50];
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(PlayerInfo[playerid][gangid] == PlayerInfo[i][gangid])
        {
            format(tempstr, sizeof(tempstr), "%s - Level :: %d\n", GetName(i),PlayerInfo[i][glevel]);
            strcat(string, tempstr);
        }
    }

    new string2[800], id;
    sscanf(params, "u", id);
    if (isnull(params))
    {
        format(string2, sizeof(string2), "{00FF00}%s\n\n{00FF00}General:\n\n{FFFFFF}Gang Id :\t%d\nGang Score :\t%d\nGangOwner :\t%s\n\n{00FF00}Online Members :\n%s",Pinfo[playerid][gname],Pinfo[playerid][gid],Pinfo[playerid][gscore],Pinfo[playerid][gowner], string);
        return ShowPlayerDialog(playerid,9982,DIALOG_STYLE_MSGBOX,"Gang Stats.",string2,"Ok","");
    }
    else if(IsPlayerConnected(id))
    {
        format(string2, sizeof(string2), "{00FF00}%s\n\n{00FF00}General:\n\n{FFFFFF}Gang Id :\t%d\nGang Score :\t%d\nGangOwner :\t%s\n\n{00FF00}Online Members :\n%s",Pinfo[playerid][gname],Pinfo[id][gid],Pinfo[id][gscore],Pinfo[id][gowner], string);
        return ShowPlayerDialog(playerid,9982,DIALOG_STYLE_MSGBOX,"gang Stats.",string2,"Ok","");
    }
    return 1;
}
Reply
#9

pawn Код:
CMD:gstats(playerid,params[])
{
    new string[500], id;
    sscanf(params, "u", id);
    if (isnull(params))
    {
        if(PlayerInfo[playerid][gangid] != PlayerInfo[i][gangid])
        {
            format(string, sizeof(string), "{00FF00}%s\n\n{00FF00}General:\n\n{FFFFFF}Gang Id :\t%d\nGang Score :\t%d\nGangOwner :\t%s\n\n{00FF00}Online Members :\n",Pinfo[playerid][gname],Pinfo[playerid][gid],Pinfo[playerid][gscore],Pinfo[playerid][gowner]);
            return ShowPlayerDialog(playerid,9982,DIALOG_STYLE_MSGBOX,"Gang Stats.",string,"Ok","");
        }
        else if(PlayerInfo[playerid][gangid] == PlayerInfo[i][gangid])
        {
            new string[300];
            for(new i = 0; i < MAX_PLAYERS; i++)
            {
                format(string, sizeof(string), "{00FF00}%s\n\n{00FF00}General:\n\n{FFFFFF}Gang Id :\t%d\nGang Score :\t%d\nGangOwner :\t%s\n\n{00FF00}Online Members :\n%s\n%s - Level :: %d",Pinfo[playerid][gname],Pinfo[playerid][gid],Pinfo[playerid][gscore],Pinfo[playerid][gowner],string, GetName(i),PlayerInfo[i][glevel]);
            }
            return ShowPlayerDialog(playerid,9982,DIALOG_STYLE_MSGBOX,"Gang Stats.",string,"Ok","");
        }
    }
    else if(IsPlayerConnected(id))
    {
        format(string, sizeof(string), "{00FF00}%s\n\n{00FF00}General:\n\n{FFFFFF}Gang Id :\t%d\nGang Score :\t%d\nGangOwner :\t%s\n\n{00FF00}Online Members :\n",Pinfo[playerid][gname],Pinfo[id][gid],Pinfo[id][gscore],Pinfo[id][gowner]);
        return ShowPlayerDialog(playerid,9982,DIALOG_STYLE_MSGBOX,"gang Stats.",string,"Ok","");
    }
    return 1;
}
Try this.
Reply
#10

....
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)