Convert SQL
#3

thanks, worked now but I have another problem.

When I open the dialog for the first time, it shows no problem but whenever I open it for second time or third or more, it doubles up (example below)

PHP код:
/* What I mean is like this (dialog):
Username 1
Username 2
Username 3
Now when I reopen the dialog 2nd time:
Username 1
Username 2
Username 3
Username 1
Username 2
Username 3
and so on.
*/
                
case 6:
                {
                    if(
strcmp(House[tmpid][tmpowner], PlayerName(playerid), false) && PlayerInfo[playerid][power] < 4) return SendClientError(playerid"You don't own this house!");
                    {
                        new 
Query[256];
                        
mysql_format(sqldbQuerysizeof Query"SELECT * FROM `HouseKeys` WHERE `houseid` = '%d'"tmpid);
                        
mysql_tquery(sqldbQuery"OnPlayerDupekeyLoad""i"playerid);
                        new 
laststring[400],string[400];
                        for(new 
0DupekeyCount[playerid]; i++)
                        {
                            
format(laststring,sizeof(laststring),"%%s\n",laststring,DupekeyString[playerid][i]);
                        }
                        
format(string,sizeof(string),"{FF0000}[+] {FFFFFF}Create a new key\n");
                        
strcat(string,laststring);
                         
ShowPlayerDialog(playerid,3001,DIALOG_STYLE_LIST,"Manage Duplicate Keys",string,"Select","Cancel");
                         return 
1;
                    }
                } 
Reply


Messages In This Thread
Convert SQL - by ServerFiles - 21.09.2018, 23:49
Re: Convert SQL - by Calisthenics - 22.09.2018, 06:51
Re: Convert SQL - by ServerFiles - 22.09.2018, 15:01

Forum Jump:


Users browsing this thread: 1 Guest(s)