25.03.2019, 18:28
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");
}
(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");
}