Hello, I have a problem with my dialog(s).
I use this "function" to create the dialog:
My first dialog:
I get the dialog response:
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?
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");
}
Код:
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");
}
}
}
}
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?