clan members
#1

This shows me a list of all the player in my clan but i don;t know what i did wrong with selected[playerid][mid] there cause when i click a player in the dialog it changes my rank,like for example i have 5 members in my clan,it show the right details for all of them, the correct rank skin name status,but when i click on a name to modifiy the rank it changes my rank only,and i think the problem is here with that selected[playerid] idk
(the code with the dialog it's not posted here)



new aim[569],query[300],clanrank,skin,string[MAX_PLAYER_NAME],idd,mid=1, name[MAX_PLAYER_NAME + 20], test[128];
format(query, sizeof(query), "SELECT * FROM `users` WHERE `Clanid` = '%d' ORDER BY `ClanRank` DESC LIMIT 10", PlayerInfo[playerid][pClanid]);
new cache:membersmod = mysql_query(mysql, query);
for(new i, j = cache_get_row_count(); i < j; i++)
{
cache_get_field_content(i, "Username", string);
clanrank = cache_get_field_content_int(i, "ClanRank");
skin = cache_get_field_content_int(i, "Skin");
new idd = GetPlayerID(string);
format(Selected[playerid][mid], MAX_PLAYER_NAME, string);
format(aim, sizeof(aim), "%s%s\t%d\t%d\t%s\n",aim ,string, clanrank, skin, ( idd != INVALID_PLAYER_ID) ? ("online") : ("offline"));
mid++;
}
format(test, sizeof(test), "Name\tRank\tSkin\tStatus\n%s", aim);
cache_delete(membersmod);
ShowPlayerDialog(playerid, DIALOG_CMODIFICATIONS, DIALOG_STYLE_TABLIST_HEADERS, "Members :",test, "Select", "Cancel");
}
Reply
#2

Please use [ pawn ] tags and indent your code so that it is readable.

As for your issue, as far as I can understand it (not very easily, please clarify and elaborate) you have an issue with values being changed when a player responds to a dialog, correct? In which case we need to see the code you have under OnDialogResponse not the code that shows the dialog in the first place.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)