Offline and Online Members
#9

Quote:
Originally Posted by Abagail
Посмотреть сообщение
Didn't notice. Lmao.

On-Topic:
This should help. Change it to fit with your system/variables.

pawn Код:
mysql_format(MySQLCon, query, sizeof(query), "SELECT * FROM `players` WHERE `faction` = '%d'", pInfo[playerid][faction]);
mysql_tquery(MySQLCon, query, "", "");
new numrows = cache_get_rows();
new username[MAX_PLAYER_NAME], string[128];
if(numrows > 0)
{
     for(new i; i < numrows; i++)
     {
           cache_get_field_content(i, "Username", username, 1, sizeof(username));
           if(ReturnUser(username)) {
            format(string, sizeof(string), "%s[ONLINE]", username);
            return SendClientMessage(playerid, -1, string);
           }
           format(string, sizeof(string), "%s[OFFLINE]", username);
           SendClientMessage(playerid, -1, string);
     }
}
This should work how-ever I did it fast so it might have mistakes.
How about SQLite?
Reply


Messages In This Thread
Offline and Online Members - by ShoortyFl - 19.10.2014, 17:36
Re: Offline and Online Members - by ShoortyFl - 19.10.2014, 19:26
Re: Offline and Online Members - by Kaperstone - 19.10.2014, 19:49
Re: Offline and Online Members - by ShoortyFl - 19.10.2014, 19:59
Re: Offline and Online Members - by ShoortyFl - 19.10.2014, 22:20
Re: Offline and Online Members - by Abagail - 19.10.2014, 22:22
Re: Offline and Online Members - by Mark_Weston - 19.10.2014, 23:10
Re: Offline and Online Members - by Abagail - 19.10.2014, 23:21
Re: Offline and Online Members - by xiaoniao - 26.06.2015, 16:20
Re: Offline and Online Members - by Abagail - 26.06.2015, 17:17

Forum Jump:


Users browsing this thread: 1 Guest(s)