OnDialogResponse does nothing
#12

Did you use the same ID's in your filterscript and gamemode?
I always use ID's 1-999 in my gamemode and 1000-1999 for first filterscript, 2000-2999 for second filterscript and so on.
Then ID's can't overlap eachother and it's unlikely any script would have more than 1000 dialogs in it.

If you used ID 7 for example in both scripts, then you will get problems.
Also, after executing the proper functions under OnDialogResponse, return 1 there to prevent another script to also act on the same ID.
Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == DIALOG_SHOP)
    {
        if(response)
        {
             switch(listitem)
             {
                case 0:
                {
                       ShowPlayerDialog(playerid, DIALOG_SHOPSTUFF,DIALOG_STYLE_LIST, "Game Shop" , "{FFFFFF}Game Money\nstuff2add", "Select", "Close");
                       return 1; // Stop other scripts to process the same ID
                }
            }
        }
    }
    return 0;
}
If you would have the same ID in both scripts without return 1 after the code, both scripts will execute their code for that ID.
If you're showing a dialog in both scripts for that same ID, then the gamemode's dialog will be shown when you're expecting the filterscript's dialog to be shown.
Reply


Messages In This Thread
OnDialogResponse does nothing - by Adamoneoone - 22.06.2018, 19:38
Re: OnDialogResponse does nothing - by grymtn - 22.06.2018, 19:58
Re: OnDialogResponse does nothing - by Adamoneoone - 22.06.2018, 20:16
Re: OnDialogResponse does nothing - by AlexMSK - 22.06.2018, 21:14
Re: OnDialogResponse does nothing - by Lokii - 22.06.2018, 21:22
Re: OnDialogResponse does nothing - by Adamoneoone - 22.06.2018, 21:41
Re: OnDialogResponse does nothing - by Lokii - 22.06.2018, 22:09
Re: OnDialogResponse does nothing - by Adamoneoone - 23.06.2018, 07:18
Re: OnDialogResponse does nothing - by JasonRiggs - 23.06.2018, 07:29
Re: OnDialogResponse does nothing - by Adamoneoone - 23.06.2018, 07:33
Re: OnDialogResponse does nothing - by JasonRiggs - 23.06.2018, 08:04
Re: OnDialogResponse does nothing - by AmigaBlizzard - 23.06.2018, 08:47
Re: OnDialogResponse does nothing - by Adamoneoone - 23.06.2018, 09:00

Forum Jump:


Users browsing this thread: 2 Guest(s)