Dialog problem
#1

I'm trying to show player's banks, but also on top "Create Bank" and "Remove Bank", problem is, it doubles, how do i fix it?

Code:
pawn Код:
public ShowBankAccounts(playerid)
{
    new query[512],results[400],title[64];
    format(title,sizeof(title),"{1B8AE4}Your Bank Accounts");
    Num1[playerid] = 0;
    Num2[playerid] = 12;
    format(query,sizeof(query),"SELECT ID, Name, Balance FROM `bankaccounts` WHERE `Owner`='%s' ORDER BY `ID` DESC LIMIT %d, %d", PlayerName(playerid), Num1[playerid], Num2[playerid]);
    mysql_query(query);
    mysql_store_result();
    new tRows = mysql_num_rows();
    if(tRows == 0) { SCM(playerid, COLOR_RED, "You do not have any bank accounts!"); return 1; }
    new pID, pName[MAX_PLAYER_NAME], bBalance;
    while(mysql_fetch_row(query))
    {
        sscanf(query, "p<|>ds[24]d", pID, pName, bBalance);
        format(results,sizeof(results),"Create Bank Account\nRemove Bank Account\n%s%s%d | %s | $%d\n", results,pID,pName,bBalance);
    }
    mysql_free_result();
    ShowPlayerDialog(playerid, mybankaccounts1, DIALOG_STYLE_LIST,title, results,"Select", "Back");
    return 1;
}
Image:

Please DO NOT post if you haven't got any experience with this!
Reply


Messages In This Thread
Dialog problem - by Jimmy0wns - 09.02.2014, 16:17
Re: Dialog problem - by Smileys - 09.02.2014, 18:03
Re: Dialog problem - by Jimmy0wns - 09.02.2014, 18:28
Re: Dialog problem - by Jimmy0wns - 10.02.2014, 18:26
Re: Dialog problem - by PowerPC603 - 10.02.2014, 18:38
Re: Dialog problem - by Jimmy0wns - 10.02.2014, 19:12

Forum Jump:


Users browsing this thread: 2 Guest(s)