SA-MP Forums Archive
[AYUDA] Con TextDraw seleccionable - 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 TextDraw seleccionable (/showthread.php?tid=416393)



[AYUDA] Con TextDraw seleccionable - Mr_Kina - 17.02.2013

Hola a todos, tengo este cуdigo pero no entiendo porque no funciona:

Код:
//Arriba de todo
new Text:Textdraw0;
new Text:Textdraw1;

//OnGameModeInit
	Textdraw0 = TextDrawCreate(525.000000, 191.000000, "abrir");
	TextDrawAlignment(Textdraw0, 2);
	TextDrawBackgroundColor(Textdraw0, 255);
	TextDrawFont(Textdraw0, 2);
	TextDrawLetterSize(Textdraw0, 0.230000, 1.600000);
	TextDrawColor(Textdraw0, -1);
	TextDrawSetOutline(Textdraw0, 1);
	TextDrawSetProportional(Textdraw0, 1);
	TextDrawUseBox(Textdraw0, 1);
	TextDrawBoxColor(Textdraw0, 255);
	TextDrawTextSize(Textdraw0, 0.000000, 26.000000);

	Textdraw1 = TextDrawCreate(577.000000, 191.000000, "cerrar");
	TextDrawAlignment(Textdraw1, 2);
	TextDrawBackgroundColor(Textdraw1, 255);
	TextDrawFont(Textdraw1, 2);
	TextDrawLetterSize(Textdraw1, 0.230000, 1.600000);
	TextDrawColor(Textdraw1, -1);
	TextDrawSetOutline(Textdraw1, 1);
	TextDrawSetProportional(Textdraw1, 1);
	TextDrawUseBox(Textdraw1, 1);
	TextDrawBoxColor(Textdraw1, 255);
	TextDrawTextSize(Textdraw1, 0.000000, 36.000000);
	
	TextDrawSetSelectable(Textdraw0, true);
	TextDrawSetSelectable(Textdraw1, true);

//En OnPlayerConnect
	SelectTextDraw(playerid, 0x9E0100FF);

//En OnPlayerSpawn
	CancelSelectTextDraw(playerid);

//En OnPlayerClickTextDraw
    if(clickedid == Textdraw0)
    {
         SendClientMessage(playerid, 0xFFFFFFAA, "abrir");
    }
    else if(clickedid == Textdraw0)
    {
         SendClientMessage(playerid, 0xFFFFFFAA, "cerrar");
    }
No me funciona, que estoy haciendo mal?


Respuesta: [AYUDA] Con TextDraw seleccionable - spell - 17.02.2013

Cambia esto
pawn Код:
TextDrawTextSize(Textdraw0, 0.000000, 26.000000);
por:

pawn Код:
TextDrawTextSize(Textdraw0, 21.000000, 26.000000);
y:

pawn Код:
TextDrawTextSize(Textdraw1, 0.000000, 26.000000);
por:

pawn Код:
TextDrawTextSize(Textdraw1, 21.000000, 26.000000);



- Mr_Kina - 17.02.2013

Gracias, y siempre son esas coordenadas X en TextDrawTextSize?

De seguro querrй hacerlo en diferente lugar con TextDraw's

Quisiera saber si siempre serбn esas coordenadas X en TextDrawSize, porque provй con un TextDraw que esta en otra posiciуn y no funciono...

Ayuda! cual es la formula!?


Respuesta: [AYUDA] Con TextDraw seleccionable - Mr_Kina - 18.02.2013

Bueno ya que nadie me ayuda ire a la secciуn inglesa haber si me prestan ayuda.


Respuesta: [AYUDA] Con TextDraw seleccionable - enigma513 - 18.02.2013

Es un tamaсo en X y en Y, no son coordenadas, tu eliges el tamaсo que le quieres poner, mientras sea mayor que cero te tiene que funcionar, pero debes tener cuidado en no poner un numero muy grande si tienes otro td seleccionable encima


Respuesta: [AYUDA] Con TextDraw seleccionable - Mr_Kina - 18.02.2013

Quote:
Originally Posted by enigma513
Посмотреть сообщение
Es un tamaсo en X y en Y, no son coordenadas, tu eliges el tamaсo que le quieres poner, mientras sea mayor que cero te tiene que funcionar, pero debes tener cuidado en no poner un numero muy grande si tienes otro td seleccionable encima
y como spell supo que numero poner exactamente? funciono bien pero ahora quiero hacerlo con otro textdraw y puse eso mismo que spell pero no funciono

que deberia poner? https://sampforum.blast.hk/showthread.php?tid=416918

se supone que es el box el que define el tamaсo pero hice los textdraw con el editor de zamaloth y los coloque tal cual salian pero aun asi no funcionaban y me daba la posicion X de TextDrawTextSize en 0.0 y igual se veia el box


Respuesta: [AYUDA] Con TextDraw seleccionable - Mr_Kina - 18.02.2013

Solucionado, como lo hice? no lo sй.


Respuesta: [AYUDA] Con TextDraw seleccionable - Parka - 18.02.2013

seguro que no probaste el que te deje en la secciуn inglesa ??

Solo tenias que agregarle esto al segundo

PHP код:
TextDrawTextSize(Textdraw1409.00 232.00335.000000);