SA-MP Forums Archive
OnDialogResponse not being executed - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: OnDialogResponse not being executed (/showthread.php?tid=525407)



Part of OnDialogResponse not being executed - Facerafter - 11.07.2014

I have this in OnDialogResponse.
But It simply does nothing.

pawn Код:
if(dialogid == 20016)
    {
        if(response)
        {
            new string[128], id;
            if(sscanf(inputtext,"u", id)) return ShowPlayerDialog(playerid, 20016, DIALOG_STYLE_INPUT, "Helper Menu - Remove Warning","For which player do you want to remove a warning?\n{FF0606}Please enter a valid ID below!" , "Enter", "Cancel");
            PlayerInfo[Helping[playerid]][pNWarns] --;
            format(string, sizeof(string), "HelperWarn: %s has remove warning from %s he now has %d warnings.", RPN(id), PlayerInfo[id][pNWarns]);
            SendHelperMessage(COLOR_REPORT, 1, string);
            format(string, sizeof(string), "A helper has removed one of your warning, you now have %d warnings.", PlayerInfo[id][pNWarns]);
            SendClientMessage(Helping[playerid], COLOR_WHITE, string);
        }
    }
pawn Код:
ShowPlayerDialog(playerid, 20016, DIALOG_STYLE_INPUT, "Helper Menu - Remove Warning", "For which player do you want to remove a warning?\nPlease enter a ID below.","Remove", "Cancel");



Re: OnDialogResponse not being executed - AIped - 11.07.2014

try return 1; in ondialogresponse..or if its there, change to return 0;


Re: OnDialogResponse not being executed - Facerafter - 11.07.2014

Nope,


Re: OnDialogResponse not being executed - RedFusion - 11.07.2014

Quote:
Returning 0 in this callback will pass the dialog to another script in case no matching code were found in your gamemode's callback.
Make sure you return 0 in the end of the callback, in filterscripts and gamemode


Re: OnDialogResponse not being executed - Facerafter - 11.07.2014

If you mean that I should use return 0, doesn't work. Already tried.


---- Solved