Concatenar dialogos no tiene ninguna magia, es simplemente colocar 'ShowPlayerDialog' dentro de 'OnDialogResponse'.
Ej:
pawn Код:
#define DIALOGO_MAIN (0)
#define DIALOG_TELES1 (1)
#define DIALOG_TELES2 (2)
#define DIALOG_TELES3 (3)
public OnPlayerCommandText(...)
{
if(!strcmp(cmdtext, "/micomando", true)
{
ShowPlayerDialog(playerid, DIALOGO_MAIN, DIALOG_STYLE_LIST, "Teleports", "Clase 1\nClase2\nClase3", "Entrar", "Salir");
return 1;
}
return 0;
}
public OnDialogResponse(...)
{
switch(dialogid)
{
case DIALOG_MAIN:
{
if(!response)
return 1;
switch(listitem)
{
case 0: //Clase 1
{
ShowPlayerDialog(playerid, DIALOG_TELES1, DIALOG_STYLE_LIST, "Teleports Clase 1", "Lugar1\nLugar2\nLugar3", "Aceptar", "Atras");
}
case 1: //Clase 2
{
ShowPlayerDialog(playerid, DIALOG_TELES2, DIALOG_STYLE_LIST, "Teleports Clase 2", "Lugar1\nLugar2", "Aceptar", "Atras");
}
case 2: //Clase 3
{
ShowPlayerDialog(playerid, DIALOG_TELES3, DIALOG_STYLE_LIST, "Teleports Clase 3", "Lugar1\nLugar2\nLugar3\nlugar4", "Aceptar", "Atras");
}
}
return 1;
}
case DIALOG_TELES1:
{
if(!response)
{
ShowPlayerDialog(playerid, DIALOGO_MAIN, DIALOG_STYLE_LIST, "Teleports", "Clase 1\nClase2\nClase3", "Entrar", "Salir");
return 1;
}
switch(listitem)
{
case 0: //Lugar 1
{
SetPlayerPos(playerid, ...);
SendClientMessage(playerid, -1, "Has sido teletransportado al lugar 1");
}
case 1: //Lugar 2
{
SetPlayerPos(playerid, ...);
SendClientMessage(playerid, -1, "Has sido teletransportado al lugar 2");
}
case 2: //Lugar 3
{
SetPlayerPos(playerid, ...);
SendClientMessage(playerid, -1, "Has sido teletransportado al lugar 3");
}
}
return 1;
}
}
return 0;
}