Menu en textdraw.
#1

Hola! como estan? he estado viendo en muchos servers que los menus de comandos y reglamentos estan hechos en textdraw (algo con mucho estilo) asi que intente hacer un menu, todo me salio bien, pero el problema es que sobrepase el limite de textdraws, porque para cada linea del menu utilizaba un textdraw, me explico:

pawn Код:
if(strcmp(cmd, "/carros", true) == 0)
    {
    TextDrawShowForPlayer(playerid, Textdraw30);
    TextDrawShowForPlayer(playerid, Textdraw31);
    TextDrawShowForPlayer(playerid, Textdraw32);
    TextDrawShowForPlayer(playerid, Textdraw33);
    TextDrawShowForPlayer(playerid, Textdraw34);
    TextDrawShowForPlayer(playerid, Textdraw35);
    TextDrawShowForPlayer(playerid, Textdraw36);
    TextDrawShowForPlayer(playerid, Textdraw37);
    TextDrawShowForPlayer(playerid, Textdraw38);
    TextDrawShowForPlayer(playerid, Textdraw39);
    TextDrawShowForPlayer(playerid, Textdraw40);
    TextDrawShowForPlayer(playerid, Textdraw41);
    TextDrawShowForPlayer(playerid, Textdraw42);
    TextDrawShowForPlayer(playerid, Textdraw43);
    TextDrawShowForPlayer(playerid, Textdraw44);
    TextDrawShowForPlayer(playerid, Textdraw45);
    TextDrawShowForPlayer(playerid, Textdraw46);
    TextDrawShowForPlayer(playerid, Textdraw47);
    TextDrawShowForPlayer(playerid, Textdraw48);
    TextDrawShowForPlayer(playerid, Textdraw49);
    TextDrawShowForPlayer(playerid, Textdraw50);
    TextDrawShowForPlayer(playerid, Textdraw51);
    TextDrawShowForPlayer(playerid, Textdraw52);
    TextDrawShowForPlayer(playerid, Textdraw53);
    TextDrawShowForPlayer(playerid, Textdraw54);
    SendClientMessage(playerid, COLOR_LIGHTBLUE, "Para quitar el menu escribe: /qcarros");
    return 1;
    }
Como veran, para el comando /carros utilizo un menu en textdraw, pero si observan bien, hay tantos "TextDrawShowForPlayer" porque cada textdraw es una linea del menu (24 textdraws!) asi que aqui viene mi pregunta: Hay alguna forma de ahorrar una cantidad considerable de textdraws y solo usar una cantidad pequeсa para un simple menu?

Gracias de antemano!
Reply
#2

No se mucho de esto pero por que no te economizas (xDD) Con Dialogs? Es mбs facil

Prueba poniendo "," entre cada numero D:
Reply
#3

Quote:
Originally Posted by Lunnatiicz
Посмотреть сообщение
No se mucho de esto pero por que no te economizas (xDD) Con Dialogs? Es mбs facil

Prueba poniendo "," entre cada numero D:
Amigo no entendi... y la verdad no me paso a dialog porque me gustan mucho los textdraws jaja!
Reply
#4

Ha? esa cantidad de TextDraws no tiene nada que ver el limite de textdraws son alrededor de 2000 para todos los players 50 no son problema, solo que talvez demorara un par de segundos en mostrarlos todos.
Reply
#5

pawn Код:
text30 = TextDrawCreate(5.000000, 120.000000, "~y~1. ~w~Carro 1~n~~y~2. ~w~Carro 2~n~");
Como vez, el '~n~' hace una nueva lнnea. En el TextDraw solo debe haber 120 letras (no estoy seguro) asн que deberбs crear mas TextDraw
Reply
#6

Quote:
Originally Posted by [M]xFire
Посмотреть сообщение
pawn Код:
text30 = TextDrawCreate(5.000000, 120.000000, "~y~1. ~w~Carro 1~n~~y~2. ~w~Carro 2~n~");
Como vez, el '~n~' hace una nueva lнnea. En el TextDraw solo debe haber 120 letras (no estoy seguro) asн que deberбs crear mas TextDraw
Mmm... no lo habia pensado, pienso que eso me ayudara a reducir los textdraws, muchas gracias!
Reply
#7

no men , lo menus de carros son feos D: no te puedes mover mientras los usas y siempre viene un novato por atras y te mata , dejalo con /nombre , es mas facil y pon el /skins con un dialog , o un textdraw si asi lo prefieres
Reply
#8

Guns Asdasdasero?

Bueno, no entendi muy bien lo de los skins...
Pero Toxic, te recomiendo que uses los dialogs, los Textdraws son muy lindos pero, como dijo Guns, van a aparecer por atras algunos players y los van a matar a los que esten con el menъ.
Reply
#9

Mmm bueno... tendre que ver que otra cosa hago... jaja! gracias de todas formas!
Reply
#10

Quote:
Originally Posted by leaNN!
Посмотреть сообщение
Guns Asdasdasero?

Bueno, no entendi muy bien lo de los skins...
Pero Toxic, te recomiendo que uses los dialogs, los Textdraws son muy lindos pero, como dijo Guns, van a aparecer por atras algunos players y los van a matar a los que esten con el menъ.
їLOL? Con los textdraw si te puedes mover, si creas un Menu de estos: "new Menu:Menu" te podras mover, pero no ligeramente, con los dialogs no te puedes mover (nada) asi que te recomiendo que uses TextDraw
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)