SA-MP Forums Archive
OnDialogResponse not working - 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 working (/showthread.php?tid=316481)



OnDialogResponse not working - MA_proking - 07.02.2012

pawn Код:
if(response)
    {
    switch(dialogid == radcat)
        {
        case 1:
            {
            switch(listitem)
            {
                case 0:
                {
                SendClientMessage(playerid, COLOR_GRAD2, "Cake");
                                }
                                case 1:
                {
                SendClientMessage(playerid, COLOR_GRAD2, "Cookie");
                                }

            }
        }
    }
}
No error no warning still not working. Filter script is loading.


Re: OnDialogResponse not working - Babul - 07.02.2012

maybe this?
pawn Код:
switch(dialogid)
        {
        case radcat:
radcat needs to be constant btw...


Re: OnDialogResponse not working - MA_proking - 07.02.2012

Quote:
Originally Posted by Babul
Посмотреть сообщение
maybe this?
pawn Код:
switch(dialogid)
        {
        case radcat:
radcat needs to be constant btw...
Still Not working.. May I send you script in paste bin?


Re: OnDialogResponse not working - iPLEOMAX - 07.02.2012

pawn Код:
#define DIALOG_RADCAT 3167

//Change all the ShowPlayerDialog(playerid, radcat, ... ); to:
ShowPlayerDialog(playerid, DIALOG_RADCAT, ... );

//OnDialogResponse:
{
    switch(dialogid)
    {
        case DIALOG_RADCAT:
        {
            if(!response) return SendClientMessage(playerid, -1, "Cancelled.");
            switch(listitem)
            {
                case 0:
                {
                    /* Player selected list item 0.*/
                }
            }
        }
        case DIALOG_OTHER: {}
        case DIALOG_ANOTHER: {}
        //and on..
    }
    return true;
}