Looping with mysql
#5

Well i have a /gon command which shows online members but i dont know how to make it for online any suggestions?
pawn Код:
CMD:gon(playerid, params[]) {
    if(playerVariables[playerid][pGroup] >= 1 && playerVariables[playerid][pGroupRank] >= 4) {
        SendClientMessage(playerid, COLOR_TEAL, "------------------[GROUP ONLINE MEMBERS]------------------------");

        foreach(Player, i) {
            if(IsPlayerConnectedEx(i) && playerVariables[i][pGroup] == playerVariables[playerid][pGroup] && playerVariables[i][pAdminDuty] < 1) {

                switch(playerVariables[i][pGroupRank]) {
                    case 1: format(szMessage, sizeof(szMessage), "* (%d) %s %s", playerVariables[i][pGroupRank], playerVariables[playerid][pCustomRank], playerVariables[i][pNormalName]);
                    case 2: format(szMessage, sizeof(szMessage), "* (%d) %s %s", playerVariables[i][pGroupRank], playerVariables[playerid][pCustomRank], playerVariables[i][pNormalName]);
                    case 3: format(szMessage, sizeof(szMessage), "* (%d) %s %s", playerVariables[i][pGroupRank], playerVariables[playerid][pCustomRank], playerVariables[i][pNormalName]);
                    case 4: format(szMessage, sizeof(szMessage), "* (%d) %s %s", playerVariables[i][pGroupRank], playerVariables[playerid][pCustomRank], playerVariables[i][pNormalName]);
                    case 5: format(szMessage, sizeof(szMessage), "* (%d) %s %s", playerVariables[i][pGroupRank], playerVariables[playerid][pCustomRank], playerVariables[i][pNormalName]);
                    case 6: format(szMessage, sizeof(szMessage), "* (%d) %s %s", playerVariables[i][pGroupRank], playerVariables[playerid][pCustomRank], playerVariables[i][pNormalName]);

                }
                SendClientMessage(playerid, COLOR_WHITE, szMessage);
            }
        }
        SendClientMessage(playerid, COLOR_TEAL, "----------------------------------------------------------------");
    }
    return 1;
}
Reply


Messages In This Thread
Looping with mysql - by MadafakaPro - 30.11.2012, 16:45
Re: Looping with mysql - by MadafakaPro - 12.12.2012, 10:16
Re: Looping with mysql - by InfiniTy. - 12.12.2012, 10:35
AW: Looping with mysql - by Kevin54321 - 12.12.2012, 13:26
Re: Looping with mysql - by MadafakaPro - 15.12.2012, 13:49
Re: Looping with mysql - by MadafakaPro - 19.12.2012, 19:00
Re: Looping with mysql - by ikey07 - 19.12.2012, 19:03

Forum Jump:


Users browsing this thread: 1 Guest(s)