Ayuda con DIALOG_STYLE_MSGBOX
#1

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

no entiendo que queres exactamente xD
Reply
#3

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
"
*/
Reply
#4

No Entendi Mucho como usar eso :S
Reply
#5

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.
Reply
#6

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

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
Reply
#8

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

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.
Reply
#10

Cierren Topic.


Hare mis mensajes de 2 Paginas.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)