SA-MP Forums Archive
TextDraw Clickable - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: TextDraw Clickable (/showthread.php?tid=610038)



TextDraw Clickable - anonimus2222222 - 19.06.2016

When going cursor to "Connect", mark TextDraw "Register". What would need to do to be only one of two marked?

Код HTML:
	   CKTD[0] = CreatePlayerTextDraw(playerid, 45.500000, 191.022186, "Register");
	   PlayerTextDrawLetterSize(playerid, CKTD[0], 0.411498, 1.886224);
	   PlayerTextDrawTextSize(playerid, CKTD[0], 551.000000, 263.822326);
	   PlayerTextDrawAlignment(playerid, CKTD[0], 1);
	   PlayerTextDrawColor(playerid, CKTD[0], 16711935);
	   PlayerTextDrawSetShadow(playerid, CKTD[0], 0);
	   PlayerTextDrawSetOutline(playerid, CKTD[0], 2);
	   PlayerTextDrawBackgroundColor(playerid, CKTD[0], 51);
	   PlayerTextDrawFont(playerid, CKTD[0], 3);
	   PlayerTextDrawSetProportional(playerid, CKTD[0], 1);
	   PlayerTextDrawSetSelectable(playerid, CKTD[0], true);
           PlayerTextDrawShow(playerid, CKTD[0]);

	   CKTD[1] = CreatePlayerTextDraw(playerid, 436.000000, 192.266632, "Connect");
	   PlayerTextDrawLetterSize(playerid, CKTD[1], 0.484499, 1.705777);
	   PlayerTextDrawAlignment(playerid, CKTD[1], 1);
	   PlayerTextDrawColor(playerid, CKTD[1], 16711935);
	   PlayerTextDrawSetShadow(playerid, CKTD[1], 0);
	   PlayerTextDrawSetOutline(playerid, CKTD[1], 2);
	   PlayerTextDrawBackgroundColor(playerid, CKTD[1], 51);
	   PlayerTextDrawFont(playerid, CKTD[1], 3);
	   PlayerTextDrawSetProportional(playerid, CKTD[1], 1);
	   PlayerTextDrawSetSelectable(playerid, CKTD[1], true);
	   PlayerTextDrawShow(playerid, CKTD[1]);



Re: TextDraw Clickable - Vince - 19.06.2016

Verify TextDrawTextSize. The first one is the size of half the screen and the second is really tiny. I recommend always using a box for clickable textdraw so you have a visual reference. The box color can later be set to something invisible so it's hidden from the players.


Re: TextDraw Clickable - anonimus2222222 - 19.06.2016

Thank you so much, come back with a review when completed. I did not know how to find those coordinates, and I think that is another function.

EDIT: It's perfect, thank's.