SA-MP Forums Archive
Duda con TextDraws - 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: Duda con TextDraws (/showthread.php?tid=531140)



Duda con TextDraws - YazukiAkira - 11.08.2014

Hola! Estoy creando un sistema de personajes en mi servidor y tengo dudas a la hora de utilizar TextDraws o TextDraws por Player.

El sistema funciona de la siguiente manera, una vez que ingresas con tu cuenta al servidor veras tus personajes con la informacion de cada uno (score, dinero, telf, etc).

Los textdraws en total son 62, si lo cargo de la siguiente manera funciona:
pawn Код:
new
    Text:MiTD1,
    //.... aca estarian todos los otros...
    Text:MiTD62;
   
for (new i = 0; i < 5; i++)// En vez de 500 (MAX_PLAYER) solo pongo 5.
{
        MiTD1 = TextDrawCreate(-1.000000,1.900000,"...");
        TextDrawUseBox(MiTD1,1);
        TextDrawBoxColor(MiTD1,0x000000ff);
        TextDrawTextSize(MiTD1,640.000000,-69.000000);
        TextDrawBackgroundColor(MiTD1,0x000000ff);
        TextDrawFont(MiTD1,3);
        TextDrawLetterSize(MiTD1,1.000000,12.199999);
        TextDrawAlignment(MiTD1,0);
        TextDrawColor(MiTD1,0x000000ff);
        TextDrawSetProportional(Box1,1);
       
        MiTD62 = TextDrawCreate(551.777648, 145.000000, "...");
        TextDrawLetterSize(MiTD62, 0.000000, 25.000000);
        TextDrawTextSize(MiTD62, 401.777618, 0.000000);
        TextDrawAlignment(MiTD62, 1);
        TextDrawColor(MiTD62, 0);
        TextDrawUseBox(MiTD62, true);
        TextDrawBoxColor(MiTD62, -256);
        TextDrawSetShadow(MiTD62, 0);
        TextDrawSetOutline(MiTD62, 0);
        TextDrawBackgroundColor(MiTD62, -256);
        TextDrawFont(MiTD62, 0);
        TextDrawSetSelectable(MiTD62, true);
}
Pero si lo hago con max player (500) no me funcionan los textdraws. Supongo que sera por que sobrepaso los limites de SAMP 2048 textdraws goblaes, 62 * 500 = 31000.

їAhora en este caso tendria que utilizar Textdraw por Player?

Es decir, crear los textdraws de seleccion cuando el jugador se conecte. Tengo entendido que el maximo es 256 por jugador.


Respuesta: Duda con TextDraws - bm0z - 11.08.2014

Si vas a usar TextDrawSetString, entonces es mejor usar textdraw por player, en caso contrario, con crear uno solo es suficiente.

El motivo de esto es que TextDrawSetString estб sincronizado, el resto de funciones se sincronizan con TextDrawHideForPlayer + TextDrawShowForPlayer.


Respuesta: Duda con TextDraws - [DOG]irinel1996 - 11.08.2014

https://sampforum.blast.hk/showthread.php?tid=408824


Respuesta: Duda con TextDraws - YazukiAkira - 11.08.2014

Quote:
Originally Posted by [DOG]irinel1996
Посмотреть сообщение
Esto aclara mis dudas.