SA-MP Forums Archive
Dialog Help - 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 Help (/showthread.php?tid=496240)



Dialog Help - JeremyPeterson - 21.02.2014

Hey all,
I'd like to know something.
Can we make 'Back' for the LIST ITEM of a dialog? Like...see below.
pawn Код:
if(dialogid == DIALOG_HELP)
    {
        if(response)
        {
            switch(listitem)
            {
                case 0:
                {
                    ShowPlayerDialog(playerid, DIALOG_CMDS, DIALOG_STYLE_LIST, "Commands", "Chat Commands \nHouse Commands.\nBack ", "Select", "Back");
                }
                case 1:
                {
                    ShowPlayerDialog(playerid, DIALOG_INFO, DIALOG_STYLE_MSGBOX, "Server Information", "Server Name...IP bla bla.", "Select", "Back");
                }
            }
            if(!response) return ShowPlayerDialog(playerid, DIALOG_HELP, DIALOG_STYLE_LIST, " Commands\nServer Information", "Select", "Back");
        }
    }
So can we do it like,when we click on CHAT COMMANDS or HOUSE COMMANDS,and we click 'BACK' and it takes back to the COMMANDS dialog.In other words,back for the cases 0 and 1.
Possible?
If yes,kindly explain.

Thanks!


Re: Dialog Help - FilesMAker - 21.02.2014

Yes you can but put this commend out :
because when player response you will not get not response.

Quote:

if(!response) return ShowPlayerDialog(playerid, DIALOG_HELP, DIALOG_STYLE_LIST, " Commands\nServer Information", "Select", "Back");




Re: Dialog Help - JeremyPeterson - 21.02.2014

Quote:
Originally Posted by FilesMAker
Посмотреть сообщение
Yes you can but put this commend out :
because when player response you will not get not response.
Let me try that,I'll answer in 2 minutes


Re: Dialog Help - JeremyPeterson - 21.02.2014

Hmm Doesn't work....how about this?
pawn Код:
case 0:
                {
                    if(response)
                    {
                        ShowPlayerDialog(playerid, DIALOG_CINFO, DIALOG_STYLE_MSGBOX, "Chat Commands", "/o  /b  /me  /do  /s", "Okay", "Back");
                    }
                    if(!response) return ShowPlayerDialog(playerid, DIALOG_CMDS, DIALOG_STYLE_LIST, "Commands", "Chat Commands \nVehicle Commands \nFaction Commands \nJob Commands \nHouse Commands.\nBack ", "Select", "Cancel");
                }



Re: Dialog Help - FilesMAker - 21.02.2014

Look explain more your problem to help you ?
and give us the whole code to see !


Re: Dialog Help - Aerotactics - 21.02.2014

I'm using this exactly to seperate male and female:

Код:
if(dialogid==2 && response)
    {
        switch(listitem)
        {
            case 0:ShowPlayerDialog(playerid, 4, DIALOG_STYLE_LIST, "White Males","White, Male, Young, BMX Rider(ID:23)\nWhite, Male, Young, Backpacker(ID:26)\nWhite, Male, Young, Drug Dealer(ID:29)\nWhite, Male, Young, Mountain Biker(ID:52)\nWhite, Male, Young, Hippie 1(ID:72)\nWhite, Male, Young, Hippie 2(ID:73)\nWhite, Male, Old, Street(ID:95)\nWhite, Male, Young, Jogger(ID:96)\nWhite, Male, Young, Criminal(ID:100)\nWhite, Male, Young, Street(ID:101)","Select","Back");
            case 1:ShowPlayerDialog(playerid, 5, DIALOG_STYLE_LIST, "Black Males","Black Male 1\nBlack Male 2\nBlack Male 3","Select","Back");
            case 2:ShowPlayerDialog(playerid, 6, DIALOG_STYLE_LIST, "Oriental Males","Oriental Male 1\nOriental Male 2\nOriental Male 3","Select","Back");
            case 3:ShowPlayerDialog(playerid, 7, DIALOG_STYLE_LIST, "Hispanic Males","Oriental Male 1\nOriental Male 2\nOriental Male 3","Select","Back");
            case 4:ShowPlayerDialog(playerid, 8, DIALOG_STYLE_LIST, "Native Males","Oriental Male 1\nOriental Male 2\nOriental Male 3","Select","Back");
		}
	}
	else if(dialogid==2 && !response)
	{
	    ShowPlayerDialog(playerid, 1, DIALOG_STYLE_MSGBOX, "Gender Selection", "Choose a gender:", "Male", "Female");
	    return 1;
	}



Re: Dialog Help - FilesMAker - 21.02.2014

Try This :
Код:
if(dialogid==2)
    {
        if(!response)
	{
	    ShowPlayerDialog(playerid, 1, DIALOG_STYLE_MSGBOX, "Gender Selection", "Choose a gender:", "Male", "Female");
	    return 1;
	}

        switch(listitem)
        {
            case 0:ShowPlayerDialog(playerid, 4, DIALOG_STYLE_LIST, "White Males","White, Male, Young, BMX Rider(ID:23)\nWhite, Male, Young, Backpacker(ID:26)\nWhite, Male, Young, Drug Dealer(ID:29)\nWhite, Male, Young, Mountain Biker(ID:52)\nWhite, Male, Young, Hippie 1(ID:72)\nWhite, Male, Young, Hippie 2(ID:73)\nWhite, Male, Old, Street(ID:95)\nWhite, Male, Young, Jogger(ID:96)\nWhite, Male, Young, Criminal(ID:100)\nWhite, Male, Young, Street(ID:101)","Select","Back");
            case 1:ShowPlayerDialog(playerid, 5, DIALOG_STYLE_LIST, "Black Males","Black Male 1\nBlack Male 2\nBlack Male 3","Select","Back");
            case 2:ShowPlayerDialog(playerid, 6, DIALOG_STYLE_LIST, "Oriental Males","Oriental Male 1\nOriental Male 2\nOriental Male 3","Select","Back");
            case 3:ShowPlayerDialog(playerid, 7, DIALOG_STYLE_LIST, "Hispanic Males","Oriental Male 1\nOriental Male 2\nOriental Male 3","Select","Back");
            case 4:ShowPlayerDialog(playerid, 8, DIALOG_STYLE_LIST, "Native Males","Oriental Male 1\nOriental Male 2\nOriental Male 3","Select","Back");
		}
	}



Re: Dialog Help - JeremyPeterson - 21.02.2014

No no look,what I'm basically asking is...
You type /help,a dialog appears.In that dialog,there are two options,'General Commands' and 'Server Info'.Once you click on General Commands,another list appears,with Faction Commands,Job Commands,House Commands,e.t.c e.t.c.
If you click on Cancel,it leads you to the main Dialog.(with the general cmds and server info option).
If you go into any of the option,let's say 'Vehicle Commands'...you see a MSGBOX,you get what you wanted.
Now the point starts here.
If you click on 'Back' when in VEHICLE COMMANDS,or HOUSE COMMANDS or whatever.It should lead you to the Sub-main Dialog.(i.e the dialog with all the options, Vehicle Cmds,House Cmds,Biz Cmds bla bla.)
You got that now?


Re: Dialog Help - JeremyPeterson - 21.02.2014

In other words,a BACK option for the CASES in dialogs.


Re: Dialog Help - FilesMAker - 21.02.2014

yeah now I understand this is like spider fiber I already use thet on myscripts now what you should is give us all public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) code to see !
you can PM it to me to see it but it will take along time. Trust me i want really help