View Full Version : Annoying bug with /members command.

22/02/2016, 08:33 PM
So, /members is a command which displays all the users with the same group as yours.
Whenever I use that command. It only displays one user from the database and not everybody.
How can I fix that?

CMD:members(playerid, params[])
if(playerVariables[playerid][pGroupRank] >= 6)
new aim[1500];
format(aim, 256,"{FFB300}%s {FFFFFF}members: \n",groupVariables[playerVariables[playerid][pGroup]][gGroupName]);
new memid;
new stringg[256];
mysql_format(handle, stringg, sizeof(stringg), "SELECT * FROM `playeraccounts` WHERE `playerGroup` = %d ORDER BY playerGroupRank DESC",playerVariables[playerid][pGroup]);
new test[256], query[256], test2[256], test3[256], days[256];
new Cache: result12 = mysql_query (handle, stringg);
for ( new i, j = cache_get_row_count ( ); i != j; ++i )
cache_get_field_content(i, "playerName", query);
format(Selected[memid][snume],24, query);
cache_get_field_content(i, "playerGroupRank", test);
cache_get_field_content(i, "playerCarWeapon3", test2);
cache_get_field_content(i, "playerLastLogin", test3);
cache_get_field_content(i, "playerDays", days);
new id = GetPlayerID(Selected[memid][snume]);
format(aim, sizeof(aim), "%s%s - Rank: %s - FW: %s/3 - online right now - %s days\n",aim,query, test,test2, days);
format(aim, sizeof(aim), "%s%s - Rank: %s - FW: %s/3 - last login: %s - %s days\n",aim,query, test,test2, test3, days);
memid ++;
ShowPlayerDialog(playerid,DIALOG_MEMBERS,DIALOG_ST YLE_LIST,"Members:",aim,"Select","Cancel");
return 1;