PHP Code:
#define DIALOG_ALGUMA_COISA 9258374
stock DisplayGroupMembers(groupid, playerid)
{
new amount[2], string[200], shortstr[55], pname[24];
format(string, sizeof(string), "Group Members for %s(ID:%d)", groupinfo[groupid][grname], groupid);
SendClientMessage(playerid, 0xFFFFFF, string);
string = "";
for(new x; x<MAX_PLAYERS; x++)
{
if(group[x][gid] == groupid)
{
amount[0] ++;
amount[1] ++;
GetPlayerName(x, pname, 24);
if(groupinfo[groupid][leader] != x) format(shortstr, sizeof(shortstr), "%s(%d),", pname, x);
if(groupinfo[groupid][leader] == x) format(shortstr, sizeof(shortstr), "[LEADER]%s(%d),", pname, x);
if(amount[1] == 1) format(string, sizeof(string), "%s", shortstr);
if(amount[1] != 1) format(string, sizeof(string), "%s %s", string, shortstr);
if(amount[0] == 6)
{
strdel(string, strlen(string)-1, strlen(string));
SendClientMessage(playerid, 0xFFCC66, string);
string = "";
amount[0] = 0;
}
}
}
strdel(string, strlen(string)-1, strlen(string));
if(amount[0] != 0) ShowPlayerDialog(playerid, DIALOG_ALGUMA_COISA, DIALOG_STYLE_MSGBOX, "Titulo", string, "Botгo 1", "Botгo 2");
return 1;
}