19.07.2014, 20:26
I had this working fine, however I modified it for multiplayer use. When a project is created, a new table is created in the database for the "ranks" what i'm trying to do is this: When you click "Open Project" it shows any projects that have your name in that table, however, it don't work.
![](http://i.imgur.com/dYtbjGg.png)
![](http://i.imgur.com/dYtbjGg.png)
pawn Код:
if(listitem == 1)
{
new string[51];
new string1[MAX_PROJECT_LENGTH];
for(new i; i<MAX_PROJECTS; i++)
{
new Query[500];
format(Query, sizeof(Query), "SELECT * FROM `PROJECT_%d_RANKS` WHERE `ID` = %d", i, PlayerInfo[pid][pID]);
mysql_query(Query);
mysql_store_result();
if(mysql_num_rows())
{
if(i != MAX_PROJECTS-1)
{
format(string, sizeof(string), "\n%d:\t%s", i, ProjectInfo[i][prName]);
strcat(string1, string);
}
}
}
ShowPlayerDialog(pid, Project_Dialog, DIALOG_STYLE_LIST, "Select a project", string1, "Okay", "Cancel");
PlayerInfo[pid][pProjects] = string1;
}