SA-MP Forums Archive
/groups help. - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: /groups help. (/showthread.php?tid=192521)



/groups help. - The_Gangstas - 22.11.2010

pawn Код:
CMD:groups(playerid, params[])
{
    #pragma unused params
    new string[128];
    SendClientMessage(playerid, WHITE, "------------------------------------------------------------");
    for(new i = 0; i < MAX_GROUPS; i++)
    {
        format(GlobalQuery, sizeof(GlobalQuery), "SELECT * FROM Groups ORDER BY Groupid LIMIT %d,1",i);
        mysql_query(GlobalQuery);
        mysql_store_result();
        if(mysql_num_rows() > 0)
        {
            format(string, sizeof(string), "Name: %s(%d)", Groups[i][GroupName], i);
            SendClientMessage(playerid, GREY, string);
        }
    }
    SendClientMessage(playerid, WHITE, "------------------------------------------------------------");
    return 1;
}
I want the command to show all of the groups with Members Online.

this makes it show 20 groups(MAX_GROUPS) even though noone is online


Re: /groups help. - The_Gangstas - 23.11.2010

bump....