OnDialogResponse not being executed
#1

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");
Reply
#2

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

Nope,
Reply
#4

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
Reply
#5

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


---- Solved
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)