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;
}
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")) );
format(minfo,sizeof(minfo),"%s\n{FA5882}%i. {FFFF90}Name: {375FFF}%s {FFFF90}Rank: {375FFF}%s (%i) {FFFFFF}Stats: %s\n",minfo, count, string, GetClanRankName(clan, GetPlayerClanRankEx(string)),GetPlayerClanRankEx(string), (!IsPlayerOnline(string)?("{00FF00}Online"):("{FF0000}Offline")) );
Change
PHP Code:
PHP Code:
|
stock GetPlayerClanRankEx(playername[]) { new rank[10]; new clanquery[100]; format(clanquery, sizeof(clanquery), "SELECT playerclanrank FROM members WHERE playername = '%s'", playername); mysql_query(1,clanquery); mysql_store_result(); mysql_fetch_row(rank); mysql_free_result(); return strval(rank); }