PDA

View Full Version : Dialog


Bunce1234
05/08/2013, 09:08 AM
hello
This code is so that you could do that if I'm writing a command will come in a dialog so far to go after him and when I click on any of it and there would be one more choice of options.
If you go to the first page and if you throw a second one then the other side. So any option to throw a special place.
Thanks in advance for your help

#include <a_samp>
#include <zcmd>
////////////////////////////////////////////////////////////////////////////////
#define DIALOG_0 8
#define DIALOG_1 9
#define DIALOG_2 10
#define DIALOG_3 11

////////////////////////////////////////////////////////////////////////////////
#define IGYTOVABB_1 16
#define IGYTOVABB_2 17
#define IGYTOVABB_3 18
////////////////////////////////////////////////////////////////////////////////

CMD:help(playerid)
{
ShowPlayerDialog(playerid, DIALOG_0, DIALOG_STYLE_LIST,"Potkocsik","Cargo\nFluids","Választ","Kilépés");
return 1;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
////////////////////////////////////Potkocsi////////////////////////////////
if(dialogid == DIALOG_0)
{
if(response)
{
if(listitem == 0)
{
ShowPlayerDialog(playerid,DIALOG_1,DIALOG_STYLE_LI ST,"Cargo","Cargo\nFluids","Next","Kilépés");
}
}
if(listitem == 1)
{
ShowPlayerDialog(playerid,IGYTOVABB_1,DIALOG_STYLE _LIST,"1 IGYTOVABB","szöveg","Next","Vissza");
}
}
////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////
if(dialogid == DIALOG_1)
{
if(!response) return ShowPlayerDialog(playerid, DIALOG_0, DIALOG_STYLE_LIST,"Cim","---1---\n----2----\n----3----\n---4---\n---5--\n---6----","Választ","Kilépés");
if(response)
{
ShowPlayerDialog(playerid,DIALOG_2,DIALOG_STYLE_LI ST,"Cargo","---2---\n(fatelep rakodó->Sf supa save)\npapír(fatelep rakodó->Sf finnancial center)\nélelmiszer(Sf catering LTF->Sf szántóföld)\nluxuscikkek(san fierro port->Ls raktár)\nüditök(LS ocean dokkok->Sf supa save)","Next","Vissza");
}
}
////////////////////////////////////////////////////////////////////////////
if(dialogid == DIALOG_2)
{
if(!response) return ShowPlayerDialog(playerid,DIALOG_1,DIALOG_STYLE_LI ST,"Cargo","sf","Next","Vissza");
if(response)
{
ShowPlayerDialog(playerid,DIALOG_3,DIALOG_STYLE_LI ST,"3 Oldal","lv","Next","Vissza");
}
}
///////////////////////////////////////////////////////////////////////////////
/////////////////////////////////Igy Tovabb/////////////////////////////////
if(dialogid == IGYTOVABB_1)
{
if(!response) return ShowPlayerDialog(playerid, DIALOG_0, DIALOG_STYLE_LIST,"Cim","Pótkocsi leirás\nIgy tovabb","Választ","Kilepes");
if(response)
{
ShowPlayerDialog(playerid,IGYTOVABB_2,DIALOG_STYLE _LIST,"2 IGYTOVABB","szöveg","Next","Vissza");
}
}
if(dialogid == IGYTOVABB_2)
{
if(!response) return ShowPlayerDialog(playerid,IGYTOVABB_1,DIALOG_STYLE _LIST,"2 IGYTOVABB","---1---\n----2----\n----3----\n---4---\n---5--\n---6----","Next","Vissza");
if(response)
{
ShowPlayerDialog(playerid,IGYTOVABB_3,DIALOG_STYLE _LIST,"3 IGYTOVABB","szöveg","Next","Vissza");
}
}
if(dialogid == IGYTOVABB_3)
{
if(!response) return ShowPlayerDialog(playerid,IGYTOVABB_2,DIALOG_STYLE _LIST,"2 IGYTOVABB","szöveg","Next","Vissza");
}
return 0;
}