case (VUELO2): { if(!response) return ShowPlayerDialog(playerid, VUELO2, DIALOG_STYLE_LIST, "їSe puede utilizar telefonos moviles durante un vuelo?", "Claro, no pasa nada\nNo interfiere con los equipos del avion\nSi, pero debe ser mediante satelite", "Siguiente", ""); if(response) { if(listitem == 0 || 2) { ShowPlayerDialog(playerid, VUELO3, DIALOG_STYLE_LIST, "їPuede un rayo destruir tu avion?", "No, la electricidad se diluye\nSi, KA-BOOM\nSi, nada como el poder de Zeus", "Siguiente", ""); } if(listitem == 1) { ShowPlayerDialog(playerid, VUELO3, DIALOG_STYLE_LIST, "їPuede un rayo destruir tu avion?", "No, la electricidad se diluye\nSi, KA-BOOM\nSi, nada como el poder de Zeus", "Siguiente", ""); RespuestasCorrectas[playerid] += 1; } } } case (VUELO3): { if(!response) return ShowPlayerDialog(playerid, VUELO3, DIALOG_STYLE_LIST, "їPuede un rayo destruir tu avion?", "No, la electricidad se diluye\nSi, KA-BOOM\nSi, nada como el poder de Zeus", "Siguiente", ""); if(response) { if(listitem == 0) { ShowPlayerDialog(playerid, DIALOG_STYLE_LIST, VUELO4, "їCuantos motores como maximo tiene un avion?", "Test\nTest\nTest", "Siguiente", ""); RespuestasCorrectas[playerid] += 1; } if(listitem == 1 || 2) { ShowPlayerDialog(playerid, DIALOG_STYLE_LIST, VUELO4, "їCuantos motores como maximo tiene un avion?", "Test\nTest\nTest", "Siguiente", ""); } } } case (VUELO4): { if(!response) return ShowPlayerDialog(playerid, DIALOG_STYLE_LIST, VUELO4,"їCuantos motores como maximo tiene un avion?", "2\n8\n1", "Siguiente", ""); if(response) { if(listitem == 0) { ShowPlayerDialog(playerid, DIALOG_STYLE_LIST, VUELO5, "їPara que es la caja negra?", "Para registrar lo ocurrido en caso de un accidente\nPara guardar cervezas y licores\nPara decorar", "Siguiente", ""); RespuestasCorrectas[playerid] += 1; } if(listitem == 1 || 2) { ShowPlayerDialog(playerid, DIALOG_STYLE_LIST, VUELO5, "їPara que es la caja negra?", "Para registrar lo ocurrido en caso de un accidente\nPara guardar cervezas y licores\nPara decorar", "Siguiente", ""); } } }
case (VUELO2):
{
if(!response) return ShowPlayerDialog(playerid, VUELO2, DIALOG_STYLE_LIST, "їSe puede utilizar telefonos moviles durante un vuelo?", "Claro, no pasa nada\nNo interfiere con los equipos del avion\nSi, pero debe ser mediante satelite", "Siguiente", "");
switch(listitem)
{
case 0,2: { ShowPlayerDialog(playerid, VUELO3, DIALOG_STYLE_LIST, "їPuede un rayo destruir tu avion?", "No, la electricidad se diluye\nSi, KA-BOOM\nSi, nada como el poder de Zeus", "Siguiente", "");}
case 1: { ShowPlayerDialog(playerid, VUELO3, DIALOG_STYLE_LIST, "їPuede un rayo destruir tu avion?", "No, la electricidad se diluye\nSi, KA-BOOM\nSi, nada como el poder de Zeus", "Siguiente", ""); RespuestasCorrectas[playerid] += 1; }
}
}
case (VUELO3):
{
if(!response) return ShowPlayerDialog(playerid, VUELO3, DIALOG_STYLE_LIST, "їPuede un rayo destruir tu avion?", "No, la electricidad se diluye\nSi, KA-BOOM\nSi, nada como el poder de Zeus", "Siguiente", "");
switch(listitem)
{
case 0: { ShowPlayerDialog(playerid, DIALOG_STYLE_LIST, VUELO4, "їCuantos motores como maximo tiene un avion?", "Test\nTest\nTest", "Siguiente", "");RespuestasCorrectas[playerid] += 1; }
case 1,2: { ShowPlayerDialog(playerid, DIALOG_STYLE_LIST, VUELO4, "їCuantos motores como maximo tiene un avion?", "Test\nTest\nTest", "Siguiente", ""); }
}
}
case (VUELO4):
{
if(!response) return ShowPlayerDialog(playerid, DIALOG_STYLE_LIST, VUELO4,"їCuantos motores como maximo tiene un avion?", "2\n8\n1", "Siguiente", "");
switch(listitem)
{
case 0:
{
ShowPlayerDialog(playerid, DIALOG_STYLE_LIST, VUELO5, "їPara que es la caja negra?", "Para registrar lo ocurrido en caso de un accidente\nPara guardar cervezas y licores\nPara decorar", "Siguiente", "");
RespuestasCorrectas[playerid] += 1;
}
case 1,2: { ShowPlayerDialog(playerid, DIALOG_STYLE_LIST, VUELO5, "їPara que es la caja negra?", "Para registrar lo ocurrido en caso de un accidente\nPara guardar cervezas y licores\nPara decorar", "Siguiente", ""); }
}
}
if(listitem == 0 || 2)
case ID_DIALOG:{ //id del dialog
if(response){ //si presionas el primer boton
switch(listitem){//los items del dialog
case 5..10: //item del 5 al 10
{//tu funcion}
case 5,10: //item del 5 o 10
{//tu funcion}
case 5: //unicamente el item 5
{//tu funcion}
default: //ningun item
{//tu funcion}
}
}else{//si presionas el segundo boton o ESC
//tu funcion
}
}
no es un bug, lo estas usando mal. xD
https://sampwiki.blast.hk/wiki/OnDialogResponse_ES pawn Код:
|
Por favor otacon, la sentencia de los listitem estaba bien puesta, usar switch es solo para optimizar. El error ya lo encontrй y era demasiado tonto xD.
Pero, para que no se confundan los nuevos, usar switch no es necesario. La misma wiki de SA:MP usa la misma sentencia que yo: https://sampwiki.blast.hk/wiki/OnDialogResponse_ES |
Por favor otacon, la sentencia de los listitem estaba bien puesta
|