[Ayuda] Dialog - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: Non-English (
https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (
https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Español/Spanish (
https://sampforum.blast.hk/forumdisplay.php?fid=29)
+---- Thread: [Ayuda] Dialog (
/showthread.php?tid=523154)
[Ayuda] Dialog -
andresis101 - 30.06.2014
Hola a todos, les pido el favor de que me ayuden diciendome como hago para crear un Dialog que tenga la opcion "Siguiente" para que te lleve a otro dialog, se bien como crear los dialogs y todo pero no se como conectarlos. saludos
Re: [Ayuda] Dialog -
Manuel_Franco - 30.06.2014
Hola consulta aqui.
https://sampforum.blast.hk/showthread.php?tid=151230
https://sampforum.blast.hk/showthread.php?tid=151793
Re: [Ayuda] Dialog -
andresis101 - 01.07.2014
Ese tutorial es para crear reglas en el principio no ayuda en nada... (Gracias por aportar

)
Respuesta: [Ayuda] Dialog -
Zume - 01.07.2014
pawn Код:
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_INPUT, "Lalala", "Pulsa siguiente.", "Siguiente", "");
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == 1)
{
if(response)
{
ShowPlayerDialog(playerid, 2, DIALOG_STYLE_INPUT, "Lalala", "Pulsa siguiente.", "Siguiente", "");
}
}
if(dialogid == 2)
{
if(response)
{
ShowPlayerDialog(playerid, 3, DIALOG_STYLE_INPUT, "Lalala", "Pulsa siguiente.", "Siguiente", "");
}
}
if(dialogid == 3)
{
if(response)
{
}
}
return 1;
}
Re: Respuesta: [Ayuda] Dialog -
YazukiAkira - 01.07.2014
Quote:
Originally Posted by Zume-Zero
pawn Код:
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_INPUT, "Lalala", "Pulsa siguiente.", "Siguiente", "");
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) { if(dialogid == 1) { if(response) { ShowPlayerDialog(playerid, 2, DIALOG_STYLE_INPUT, "Lalala", "Pulsa siguiente.", "Siguiente", ""); } } if(dialogid == 2) { if(response) { ShowPlayerDialog(playerid, 3, DIALOG_STYLE_INPUT, "Lalala", "Pulsa siguiente.", "Siguiente", ""); } } if(dialogid == 3) { if(response) { } } return 1; }
|
Tengo una duda con esto, їcomo puedo ir guardando valores enteros y de tipo string del dialog para luego recuperarlos en una funcion?
EJ:
pawn Код:
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_INPUT, "Ingrese su clave", "Su clave debe contener letras y numeros.", "Siguiente", "");
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == 1)
{
if(response)
{
// їAqui deberia guardar la clave en una variable de tipo string?
ShowPlayerDialog(playerid, 2, DIALOG_STYLE_INPUT, "Ingrese su edad", "Pulsa siguiente.", "Siguiente", "");
}
}
if(dialogid == 2)
{
if(response)
{
// їAqui deberia guardar la edad en una variable de tipo entero?
ShowPlayerDialog(playerid, 3, DIALOG_STYLE_LIST, "Seleccione su genero", "Hombre\nMujer.", "Siguiente", "");
}
}
if(dialogid == 3)
{
switch (listitem)
{
case 0:
{
// Es hombre
// їAqui deberia guardar la edad en una variable de tipo entero?
// Ejecuto una funcion
GuardarDatos(playerid);
}
case 1:
{
// Es mujer
// їAqui deberia guardar la edad en una variable de tipo entero?
// Ejecuto una funcion
GuardarDatos(playerid);
}
}
}
return 1;
}
stock GuardarDatos(playerid)
{
// Aqui quiero recuperar los datos almacenados en las variables, luego pienso hacer un INSERT a una tabla de MYSQL con los datos de las variables
// їComo podria hacer eso?
}