23.03.2019, 15:35
pawn Code:
stock GetClanMembers(clan[])
{
new minfo[3*550], mreturn[386], string[386], clanquery[160], count;
format(clanquery, sizeof(clanquery), "SELECT * FROM members WHERE clanname = '%s'", clan);
mysql_query(1,clanquery);
mysql_store_result();
while(mysql_fetch_row_format(clanquery,"|"))
{
count++;
mysql_fetch_field_row(string,"playername");
format(minfo,sizeof(minfo),"{FA5882}%i. {FFFF90}Name: {375FFF}%s {FFFF90}Rank: {375FFF}%s (%i) {FFFFFF}Stats: %s\n",count, string, GetClanRankName(clan, GetPlayerClanRankEx(string)),GetPlayerClanRankEx(string), (!IsPlayerOnline(string)?("{00FF00}Online"):("{FF0000}Offline")) );
strcat(mreturn, minfo);
}
mysql_free_result();
return mreturn;
}
CMD:cmembers(playerid, params[])
{
LoginCheck(playerid);
if(IsPlayerAnyClanMember(playerid))
{
Dialog_Show(playerid, DialogUnused, DIALOG_STYLE_MSGBOX, "Afrade Clan", "{FA5882}%s", "Ok","" ,GetClanMembers(GetPlayerClan(playerid)));
} else return Error(playerid, "Dastersi Nadarid.");
return true;
}
Just get one row and show on the dialog.
How to fix this??