26.06.2012, 09:00
I have a rpg server and i need a command /members that shows the online members of your factions and their rank, can someone help me ?
command(members, playerid, params[])
{
new string[256];//It will add on to the string each time it finds a member, so you need a big-ish string.
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(PlayerInfo[playerid][pMember] == PlayerInfo[i][pMember])
{
format(string, sizeof(string), "%s\n%s", string, pName(i));
}
}
ShowPlayerDialog(playerid, 9999, DIALOG_STYLE_LIST, "Member(s) online", string, "OK", "");
return 1;
}