SA-MP Forums Archive
Qu Hize mal en este 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: Qu Hize mal en este Dialog.. (/showthread.php?tid=320650)



Qu Hize mal en este Dialog.. - Fede.Zink - 24.02.2012

Hola Foro samp:

Bueno el problema es que cuando elijo la opcion que quiero no pasa nada nisiquiera cuando cancelo manda el mensaje

pawn Код:
if (strcmp("/Comando", cmdtext, true, 10) == 0)
    {
    ShowPlayerDialog(playerid, 69, DIALOG_STYLE_LIST, "Prueba", "Ayunta LS\nLSPD", "Aceptar", "Cancelar");
        return 1;
     }
Ahi Creo el Dialog ahora el public onplayerdialogresponse:

pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    switch(dialogid == 69)
    {
        case 1:
        {
            if(!response)
            {
                SendClientMessage(playerid, 0xFF0000FF, "Has cancelado");
                return 1;
            }

            switch(listitem)
            {
                case 0:
                {
                SetPlayerPos(playerid, 1540.4711,-1675.2888,13.5507);
                }
                case 1:
                {
                SendClientMessage(playerid, AMARILLO, "ASDASDASD");
                }

            }

        }
    }
    return 0;
}
Que Ise mal no me sale nada no Anda


Respuesta: Qu Hize mal en este Dialog.. - [Nikk] - 24.02.2012

probablemente ese id de dialog lo tengas ocupado por otro


Respuesta: Qu Hize mal en este Dialog.. - Fede.Zink - 24.02.2012

Xdd es un FS no tengo ni un Dialog


Respuesta: Qu Hize mal en este Dialog.. - ValenRatti - 24.02.2012

meparece que el error esta en que:
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    switch(dialogid == 69)
    {
        case 1:
        {
            if(!response)
            {
                SendClientMessage(playerid, 0xFF0000FF, "Has cancelado");
                return 1;
            }
        }// creo q tenia q cerrar este case antes de emppezar el otro switch

            switch(listitem)
            {
                case 0:
                {
                SetPlayerPos(playerid, 1540.4711,-1675.2888,13.5507);
                }
                case 1:
                {
                SendClientMessage(playerid, AMARILLO, "ASDASDASD");
                }

            }

        }
     return 0;
    }
es un poco mas lento pero sino asi:
pawn Код:
if(dialogid == 69)
    {
         if(!response)
         {
                SendClientMessage(playerid, 0xFF0000FF, "Has cancelado");
                return 1;
         }
  if(response)
 {
          if(listitem == 0)
            {
                SetPlayerPos(playerid, 1540.4711,-1675.2888,13.5507);
            }
            if(listitem == 1)
            {
                SendClientMessage(playerid, AMARILLO, "ASDASDASD");
            }
         }
   return 1;
}



Respuesta: Qu Hize mal en este Dialog.. - Jovanny - 24.02.2012

pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    switch(dialogid)
    {
        case 69:
        {
            switch(response)
            {
                case 0:
                {
                    SendClientMessage(playerid, 0xFF0000FF, "Has cancelado");
                    return 1;
                }
                case 1:
                {
                    switch(listitem)
                    {
                        case 0:SetPlayerPos(playerid, 1540.4711,-1675.2888,13.5507);
                        case 1:SendClientMessage(playerid, AMARILLO, "ASDASDASD");
                    }
                }
            }
        }
    }
    return 0;
}