SA-MP Forums Archive
Ayuda con DIALOG_STYLE_MSGBOX - 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 con DIALOG_STYLE_MSGBOX (/showthread.php?tid=147323)



Ayuda con DIALOG_STYLE_MSGBOX - Jesus^ - 11.05.2010

Hola!
Les queria pedir, Como hacer un Menu "Largo" en MSGBOX


Re: Ayuda con DIALOG_STYLE_MSGBOX - TheChaoz - 11.05.2010

no entiendo que queres exactamente xD


Re: Ayuda con DIALOG_STYLE_MSGBOX - Miguel - 11.05.2010

Quote:
Originally Posted by Jesus^
Hola!
Les queria pedir, Como hacer un Menu "Largo" en MSGBOX
Que normalmente no puedes poner mensajes largos porque el compilador te da un error.

Mi soluciуn fuй esta:

pawn Код:
new string[es importante que pongas un aproximado del tamaсo aquн];

strcat(string, "texto hhhhhhhhhhhhhhhhhhhhhhhgdskjhjhjjjhjhjhjhhjjhjhsdf");
strcat(string, "MAS TEXTO fhsdkgjhdkjghfdkjhgjkfhgkjfdhgkdfjhgkfdjhgkdf");
strcat(string, "\n nueva linea");
/*
Quedarнa el mensaje final asн:
"
texto hhhhhhhhhhhhhhhhhhhhhhhgdskjhjhjjjhjhjhjhhjjhjhsdfMAS TEXTO fhsdkgjhdkjghfdkjhgjkfhgkjfdhgkdfjhgkfdjhgkdf
nueva linea
"
*/



Re: Ayuda con DIALOG_STYLE_MSGBOX - Jesus^ - 12.05.2010

No Entendi Mucho como usar eso :S


Re: Ayuda con DIALOG_STYLE_MSGBOX - Zoutdaxv - 12.05.2010

Si lo que quieres es un menъ, se usa DIALOG_STYLE_LIST, para el string que llamaremos 'str' se le pone [] sin nъmero para que sea dinбmico y no te dй problemas por si te pasas de caracteres.
Cada '\n' es una nueva lнnea y por lo tanto otro 'listitem' y cada '\' es para seguir con el string en la siguiente lнnea si no el compilador te darб error si el string estб muy grande.

Esto puede ir en un comando:
pawn Код:
new str[] = "Lista_1\nLista_2\nLista_3\nLista_4\nLista_5\nLista_6\nLista_7\
         \nLista_8\nLista_9\nLista_10\nLista_11\nLista_12\nLista_13"
;

ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "Menъ", str, "Aceptar", "Cancelar");
Y aquн lo que le pondras que le dй en el menъ, recuerda que se empieza por cero en 'listitem':
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
  if(dialogid == 1)
  {
    if(response) // Si puso "Aceptar"
    {
      if(listitem == 0)//"LISTA_1"
      {
       
      }
      if(listitem == 1)//"LISTA_2"
      {

      }
      if(listitem == 2)//"LISTA_3"
      {

      }
      return 1;
    }
  }
  return 0;
}
Espero haber ayudado, suerte.

Zoutdaxv.


Re: Ayuda con DIALOG_STYLE_MSGBOX - Jesus^ - 12.05.2010

Coсo man, Dime donde he dicho yo que quiero un menu?


Re: Ayuda con DIALOG_STYLE_MSGBOX - TheChaoz - 12.05.2010

Quote:
Originally Posted by Jesus^
Coсo man, Dime donde he dicho yo que quiero un menu?
Quote:
Originally Posted by Jesus^
Como hacer un Menu "Largo" en MSGBOX
justito ahi (?)

podes explicar bien que es lo que queres hacer, porque me parece que nadie te entendio


Re: Ayuda con DIALOG_STYLE_MSGBOX - Jesus^ - 12.05.2010

Quote:
Originally Posted by the_chaoz
porque me parece que nadie te entendio
Pues, SAWC, Como es bien intelgente, si entendio :S


Re: Ayuda con DIALOG_STYLE_MSGBOX - Zoutdaxv - 12.05.2010

pawn Код:
new str[] = "string_string_string_string_string_string_string_string_string_\
         string_string_string_string_string_string_string_string_string_\
         string_string_string_string_string_string_string_string_string_"
;

ShowPlayerDialog(playerid, 1, DIALOG_STYLE_MSGBOX, "asd", str, "Aceptar", "Cancelar");
Explicate mejor, si eso que puse no es lo que quieres no me importa ya no pienso ayudarte yo.


Re: Ayuda con DIALOG_STYLE_MSGBOX - Jesus^ - 12.05.2010

Cierren Topic.


Hare mis mensajes de 2 Paginas.