Dialog not giving response
#1

Hey, I've got a problem(like usual ) all the dialogs open however when I get to the confirmation screen and select 'Stop Event'
it doesnt give me the notification 'DM stopped' I dont get any warnings after compiling so I really dont know where I messed up.




Код:
ShowPlayerDialog(playerid, DIALOG_EVENT_THIRD, DIALOG_STYLE_MSGBOX, "Confirmation", "You are about to end the event.\n                   Are you sure?", "Stop Event", "Cancel");
Код:
 public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == DIALOG_EVENT_THIRD)
    {
        if(response)
        {
            switch(listitem)
            {
                case 0: SendClientMessage(playerid, -1, "DM stopped.");

                case 1: SendClientMessage(playerid, -1, "Cancelled.");
            }
        }
        return 1;
    }

    return 0;
}
Reply
#2

Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == DIALOG_EVENT_THIRD)
    {

        if(!response) 
        {
               SendClientMessage(playerid, -1, "Cancelled.");
        }
        else 
        {
                SendClientMessage(playerid, -1, "DM stopped.");
        }
        return 1;
    }

    return 0;
}
you was using listitem for a msgbox

https://sampwiki.blast.hk/wiki/OnDialogResponse
Reply
#3

Thanks man, repped!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)