Which variable do you use to track the faction the member is part of? Anyway, should be something like this. Make sure you edit it to your variables. Don't forget to make your own command. I haven't tested it.
pawn Код:
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pMember] == 1)
{
SendClientMessage(playerid, COLOR_GRAD1, "Faction members online:");
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(PlayerInfo[i][pMember] == 1)
{
GetPlayerName(i, sendername, sizeof(sendername));
if(PlayerInfo[i][pRank] == 6)
{
format(string, 256, "** %s - RANK1 **", sendername);
SendClientMessage(playerid, -1, string);
}
else if(PlayerInfo[i][pRank] == 5)
{
format(string, 256, "** %s - RANK2 **", sendername);
SendClientMessage(playerid, -1, string);
}
else if(PlayerInfo[i][pRank] == 4)
{
format(string, 256, "** %s - RANK3 **", sendername);
SendClientMessage(playerid, -1, string);
}
else if(PlayerInfo[i][pRank] == 3)
{
format(string, 256, "** %s - RANK4 **", sendername);
SendClientMessage(playerid, -1, string);
}
else if(PlayerInfo[i][pRank] == 2)
{
format(string, 256, "** %s - RANK5 **", sendername);
SendClientMessage(playerid, -1, string);
}
else if(PlayerInfo[i][pRank] == 1)
{
format(string, 256, "** %s - RANK6 **", sendername);
SendClientMessage(playerid, -1, string);
}
}
}
}
}
}