Dialog will not work, not sure why.
#1

pawn Код:
else if(dialogid == DIALOG_SHOWPERSON)   //if the player responsed to the dialog (ID = 0, as we've set it as such - you'll use your definition) then the script continues here
            {
                if(response == 0)   //response 0 is always the SECOND BUTTON! (in our case this was "Close".
                {
                    return 1;
                }
                else //If the player did not press the close button, but the "Select" button, the script reads the following.
                {
                    new dialogstring[128],string[128];

                    format(string, sizeof(string), "SELECT * FROM `arecords` WHERE `PSQLID` = %d ORDER BY `id` DESC LIMIT 10", psql);
                    mysql_query(string);
                    mysql_store_result();
                    new r_msg[500];
                    while(mysql_fetch_row(r_msg))
                    {
                        sscanf(r_msg, "p<|>e<iiiis[24]iiiii>", PlayerArrests[10]);
                        if(mysql_num_rows() == 0)
                        {
                            format(dialogstring, sizeof(dialogstring), "%s", PlayerArrests[10][ar_cr]);
                        }
                        if(mysql_num_rows() > 0)
                        {
                            format(dialogstring, sizeof(dialogstring), "%s\n%s", dialogstring, PlayerArrests[10][ar_cr]);
                        }
                        else
                        {
                            SendClientMessage(playerid, COLOUR_GREY, "No records found.");
                        }
                    }
                    ShowPlayerDialog(playerid, DIALOG_RECORDS, DIALOG_STYLE_LIST, "Arrest Info", dialogstring, "Select", "Close");
                }
            }
It simply will not show.
Reply
#2

Are you using ZCMD? that would be a lot easier

Also what is the error?

Quote:

----------------------------------------------------------
Owner of Millenium Roleplay
CallumDaBest - Got hacked
Next update on MRP: Next week - since i got hacked!
----------------------------------------------------------

Reply
#3

I am using ZCMD and there is no error, simply won't display.
Reply
#4

Your doing /arrestinfo or something? about arresting the person for coppers?

Also what is the error?

Quote:

----------------------------------------------------------
Owner of Millenium Roleplay
CallumDaBest - Got hacked
Next update on MRP: Next week - since i got hacked!
----------------------------------------------------------

Reply
#5

Yeah, it's in a dialog though.

There is no error, the dialog won't open when called.
Reply
#6

Define for the dialog... Perhaps, the ID you defined was too large(over the max dialog capacity), or another filter-script is using the same dialog ID...
Reply
#7

EDIT:

Realised I was clicking the wrong button on dialog. (0)
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)