23.06.2018, 08:47
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.
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.
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'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.