24.02.2015, 10:09
Привет, ребята. Не показывает игроков оффлайн, показывает всех игроков, которые состоят во фракции.
PHP код:
SendClientMessage(playerid, 0x33AAFFFF, "Члены организации оффлайн:");
format(query, sizeof(query), "SELECT * FROM `accounts` WHERE `u_member` = '%d'",PlayerInfo[playerid][iMember]);
mysql_function_query(MySQL_CONNECT, query, true, "OFFmembers", "d",playerid);
PHP код:
@_ OFFmembers(playerid)
{
new i, temp[32], name[MAX_PLAYER_NAME], rank, playeridd = INVALID_PLAYER_ID;
cache_get_data(rows, fields);
if(rows)
{
for(i = 0; i < rows; i++)
{
cache_get_field_content(i, "u_name", temp), strmid(name, temp,strlen(temp), MAX_PLAYER_NAME);
cache_get_field_content(i, "u_rank", temp), rank = strval(temp);
if(!IsPlayerConnected(playeridd))
{
format(ZCMDstr, sizeof(ZCMDstr),"[L] %s Rank: %d", name, rank);
SendClientMessage(playerid, -1, ZCMDstr);
}
playeridd = INVALID_PLAYER_ID;
}
}
else SendClientMessage(playerid, COLOR_GREY, "Список пуст");
return true;
}