10.01.2014, 10:16
Its made to show the offline members but its showing the players even they are online it shows them that they are online
Whats wrong here?
Whats wrong here?
pawn Код:
COMMAND:foff(playerid)
{
if(PlayerInfo[playerid][playerteam] == CIV || PlayerInfo[playerid][playerteam] == 0)
return SendClientError(playerid, "You cannot use this as civilian.");
format(iStr, sizeof(iStr), "[FACTION] OFFLINE %s members:", PlayerInfo[playerid][PTeamName]);
SendClientMessage(playerid, COLOR_HELPEROOC, iStr);
new szQuery[ 128 ], tmp[80];
format(szQuery, sizeof(szQuery), "SELECT Name, Faction, rankname, Fpay FROM `players` WHERE Faction='%s'", PlayerInfo[playerid][PTeamName]);
mysql_query(szQuery);
mysql_store_result();
while( mysql_fetch_row_format( iStr,"|") )
{
new eName[ 32 ], eFaction[ 32 ], eRank[ 32 ], ePay;
sscanf( iStr , "sssd" , eName, eFaction, eRank, ePay);
if(GetPlayerId(eName) == INVALID_PLAYER_ID)
{
format(tmp, sizeof(tmp), "* %s - [Rank: %s] [Payment: $%s] [Offline]", NoUnderscore(eName), eRank, number_format(ePay));
SendClientMessage(playerid, COLOR_PLAYER_DARKGREY, tmp);
}
}
mysql_free_result();
return 1;
}