SA-MP Forums Archive
ondialogresponse (not working help please) - 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 help please) (/showthread.php?tid=403004)



ondialogresponse (not working help please) - cluckintucker - 28.12.2012

hi, when im using public OnDialogResponse it only lets me put GivePlayerWeapon thats all it cant even
Код:
SendClientMessage
here is the code im using for ex
Код:
if(response)
    {
        switch(dialogid)
        {
            case 2424:// Our dialog!
            {
                switch(listitem)// Checking which listitem was selected
                {
                    case 0: // The first item listed
                    {
                        SendClientMessage(playerid,0x33CCFFAA,"Congratulations with your new job, type /helpjob to see your new command.");
                        wJob[playerid] = 1;  //Changes your job to 1 (Mechanic)
                    }
                    case 1: // The second item listed
                    {
                        SendClientMessage(playerid,0x33CCFFAA,"Congratulations with your new job, type /helpjob to see your new command.");
                        wJob[playerid] = 2;  //Changes your job to 2 (Taxi)
                    }
                }
            }
        }
    }
    return 1;
it dont work can someone help please with this so it can send player message and help with this >> https://sampforum.blast.hk/showthread.php?tid=354763 when i click mechanic or taxi it doesnt give me job thanks. if you help i will rep you


Re: ondialogresponse (not working help please) - Dragonborn - 28.12.2012

Why you put the
pawn Код:
if(response)
    {
before the verification of dialogid
pawn Код:
switch(dialogid)
        {
            case 2424:// Our dialog!
            {
??

try to remove the "if(response)" and see if work.


Re: ondialogresponse (not working help please) - cluckintucker - 28.12.2012

it dont work


Re: ondialogresponse (not working help please) - Konstantinos - 28.12.2012

If it's filterscript, you need to return 0, else return 1. And make sure you don't use the same dialogid.


Re: ondialogresponse (not working help please) - RedCrossER - 28.12.2012

Return 1; after handling a dialog