SA-MP Forums Archive
Dialog "Close" problem - 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 "Close" problem (/showthread.php?tid=401692)



Dialog "Close" problem - NighelN - 23.12.2012

Hello, when i click close on my dialog it opens the handgun dialog?

Where do i edit the close button in pawno?




Re: Dialog "Close" problem - tyler12 - 23.12.2012

if(!response) return 0;


Re: Dialog "Close" problem - Randy More - 23.12.2012

Hit CTRL+F and search for "Choose a weapon type" and you will find a ShowPlayerDialog which is this text is apart of, get the dialog ID (ShowPlayerDialog(playerid, DIALOGID,..) and search for "dialogid == DIALOGID" then you should have your code that way.

pawn Код:
if(dialogid == DIALOGID)
{
    if(response)
    {
        // What happens if you click "Choose" button.
    }
    else
    {
        // What happens if clicks "Close" button, if you want it to just close add a "return 1;" here or delete the whole else with it braces ({ }).
    }

}
Or you can find it that way

pawn Код:
if(dialogid == DIALOGID)
{
    if(!response) return 1; // This will just close the dialog if "Close" is clicked.
    // Your code if "Choose" is clicked.
}



Re: Dialog "Close" problem - NighelN - 23.12.2012

Thnx got my shops working!