Problem with Dialog

Статус
В этой теме нельзя размещать новые ответы.

Uztor

Новичок
Автор темы
42
0
Hello, I have a problem with my dialog(s).
I use this "function" to create the dialog:

Код:
void showSampDialog(int send, int dialogID, int typedialog, char *caption, char *text, char *button1, char *button2)
{
    uint32_t func = SF->getSAMP()->getSAMPAddr() + SAMP_DIALOG_SHOW;
    uint32_t data = SF->getSAMP()->getSAMPAddr() + SAMP_DIALOG_INFO_OFFSET;

    __asm mov eax, dword ptr[data]
        __asm mov ecx, dword ptr[eax]
        __asm push send
    __asm push button2
    __asm push button1
    __asm push text
    __asm push caption
    __asm push typedialog
    __asm push dialogID
    __asm call func
    return;
}

My first dialog:
Код:
void _cdecl cmd_cmenu(char *param)
{
    showSampDialog(1, 600, 2, " Cheat Menu", "1\n2\n3\n4", "Next", "Cancel");
}
I get the dialog response:
Код:
void dialogResponse(int dialogID, int buttonID, int listboxItem, char* input)
{
    SF->getSAMP()->getChat()->AddChatMessage(-1, "Dialogid: %d ButtonID: %d ListboxItem: %d Inputresponse: %s", dialogID, buttonID, listboxItem, input)
    if (dialogID == 600)
    {
        if (buttonID == 1)
        {
            if (listboxItem == 2)
            {
                showSampDialog(1, 601, 2, "Raknet", "Debug Dialog-Response", "Okay", "Cancel");
            }
        }
    }
}
My problem:
I see the debug message and the first dialog. (SF->getSAMP()->getChat()->AddChatMessage(-1, "Dialogid: %d ButtonID: %d ListboxItem: %d Inputresponse: %s", dialogID, buttonID, listboxItem, input))

But I didn't see the second dialog (showSampDialog(1, 601, 2, "Raknet", "Debug Dialog-Response", "Okay", "Cancel")).

Why?
 

Uztor

Новичок
Автор темы
42
0
how can I close another dialog?
Код:
SF->getSAMP()->getDialog()->Close(0);

Код:
if (listboxItem == 0)
            {
                SF->getSAMP()->getDialog()->Close(0);
                SF->getSAMP()->getDialog()->ShowDialog(601, 2, "lolll!", "SA-MP Patches\nGTA Patches\nRaknet\nCredits", "Next", "Cancel");
                SF->getSAMP()->getDialog()->bServerside = 1;
            }

doesn't work.
 

povargek

Известный
Друг
96
289
how can I close another dialog?
Код:
SF->getSAMP()->getDialog()->Close(0);

Код:
if (listboxItem == 0)
            {
                SF->getSAMP()->getDialog()->Close(0);
                SF->getSAMP()->getDialog()->ShowDialog(601, 2, "lolll!", "SA-MP Patches\nGTA Patches\nRaknet\nCredits", "Next", "Cancel");
                SF->getSAMP()->getDialog()->bServerside = 1;
            }

doesn't work.

if dialog style is NOT IS LIST, listitem been -1
 
Статус
В этой теме нельзя размещать новые ответы.