Dialog not giving response - 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: Dialog not giving response (
/showthread.php?tid=594682)
Dialog not giving response -
Counterafk - 21.11.2015
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;
}
Re: Dialog not giving response -
MeCom - 21.11.2015
Код:
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
Re: Dialog not giving response -
Counterafk - 21.11.2015
Thanks man, repped!