SA-MP Forums Archive
I Need /members that works - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: I Need /members that works (/showthread.php?tid=474939)



I Need /members that works - Lloyde - 10.11.2013

i need a script of /members of family and faction that works thanks



Re: I Need /members that works - Danialdano - 10.11.2013

This isent the right section to request a code from someone post here https://sampforum.blast.hk/showthread.php?tid=447813


Re: I Need /members that works - Twizted - 10.11.2013

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);
                        }
                    }
                }
            }
        }
    }