PDA

View Full Version : [HELP]Guys Can you Mix Both the dialog into one?Please help brothers.


Guest4390857394857
17/04/2014, 02:26 PM
SOLVED

iThePunisher
17/04/2014, 02:39 PM
Test this
and if you have got any error show me
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;
}

Guest4390857394857
17/04/2014, 02:58 PM
....

Guest4390857394857
17/04/2014, 05:21 PM
*BUMP*
Try to solve anyone?

Guest4390857394857
18/04/2014, 07:30 AM
....

taylorcro
18/04/2014, 07:36 AM
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", "");

Guest4390857394857
18/04/2014, 07:37 AM
....

Conradus
18/04/2014, 07:52 AM
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;
}

Hanuman
18/04/2014, 08:02 AM
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.

Guest4390857394857
18/04/2014, 08:26 AM
....