Clan.inc, GetOnlineClanMembers
#3

Code:
stock GetOnlinePlayersCount(clan[])
{
        new count = 0;
        for(new i = 0; i < MAX_PLAYERS; i++)
            if(IsPlayerConnected(i) == 1 && IsPlayerClanMember(i, clan) == 1)
                count += 1;

        return count;
}

stock GetOnlinePlayersList(clan[])
{
        new count = GetOnlinePlayersCount(clan);
        new minfo[32], mreturn[32 * count];
        for(new i = 0; i < MAX_PLAYERS; i++)
            if(IsPlayerConnected(i) == 1 && IsPlayerClanMember(i, clan) == 1)
            {
                 format(minfo, sizeof(minfo), "%s\n", string);
                 strcat(mreturn, minfo);
            }

         return mreturn;
}
Bit shitty and unoptimized, but does what you need.
Reply


Messages In This Thread
Clan.inc, GetOnlineClanMembers - by Vizi10 - 03.01.2019, 20:12
Re: Clan.inc, GetOnlineClanMembers - by Kaliber - 04.01.2019, 07:22
Re: Clan.inc, GetOnlineClanMembers - by fiki574 - 04.01.2019, 08:17

Forum Jump:


Users browsing this thread: 1 Guest(s)