SA-MP Forums Archive
All textdraws are selecting! - 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: All textdraws are selecting! (/showthread.php?tid=602070)



All textdraws are selecting! - Pawnify - 01.03.2016

Hi, I'm new to textdraws and when I'm hovering over the far right one, all of them before act like I'm hovering over it!

How can I make it so only one gets selected



Re: All textdraws are selecting! - ikey07 - 01.03.2016

Use TextDrawUseBox and make box size accoringly to text(content) you want to select.


Re: All textdraws are selecting! - Pawnify - 01.03.2016

Quote:
Originally Posted by ikey07
View Post
Use TextDrawUseBox and make box size accoringly to text(content) you want to select.
How do get the coordinates of where the text on one ends?


Re: All textdraws are selecting! - [NWA]Hannes - 01.03.2016

I assume you have all of that text in the same textdraw, show us your code please.

You will have to use TextDrawCreate and assign it to a Text:Whatever for every different piece of text you want to select.

It could also be that you have royally fucked up one of your textdraws, making its box cover the others.


Re: All textdraws are selecting! - Pawnify - 01.03.2016

Quote:
Originally Posted by [NWA]Hannes
View Post
I assume you have all of that text in the same textdraw, show us your code please.

You will have to use TextDrawCreate and assign it to a Text:Whatever for every different piece of text you want to select.

It could also be that you have royally fucked up one of your textdraws, making its box cover the others.
I fiddled with it to try and fix it, and this is the code. Now it only lets me select vagos and fast food
The textdraws are:
Code:
	Grove = TextDrawCreate(15.666670, 331.436981, "Grove Street");
	TextDrawLetterSize(Grove, 0.449999, 1.600000);
	TextDrawTextSize(Grove, 118.666656, -68.859283);
	TextDrawAlignment(Grove, 1);
	TextDrawColor(Grove, 8388863);
	TextDrawUseBox(Grove, true);
	TextDrawBoxColor(Grove, 0);
	TextDrawSetShadow(Grove, 0);
	TextDrawSetOutline(Grove, 1);
	TextDrawBackgroundColor(Grove, 51);
	TextDrawFont(Grove, 1);
	TextDrawSetProportional(Grove, 1);

	Ballas = TextDrawCreate(135.666702, 331.851837, "Ballas Families");
	TextDrawLetterSize(Ballas, 0.449999, 1.600000);
	TextDrawTextSize(Ballas, 249.333343, -1.244444);
	TextDrawAlignment(Ballas, 1);
	TextDrawColor(Ballas, -2147450625);
	TextDrawUseBox(Ballas, true);
	TextDrawBoxColor(Ballas, 0);
	TextDrawSetShadow(Ballas, 0);
	TextDrawSetOutline(Ballas, 1);
	TextDrawBackgroundColor(Ballas, 51);
	TextDrawFont(Ballas, 1);
	TextDrawSetProportional(Ballas, 1);

	FastFood = TextDrawCreate(268.000091, 332.266723, "Fast Food");
	TextDrawLetterSize(FastFood, 0.449999, 1.600000);
	TextDrawTextSize(FastFood, 347.000000, 7.881481);
	TextDrawAlignment(FastFood, 1);
	TextDrawColor(FastFood, -5963521);
	TextDrawUseBox(FastFood, true);
	TextDrawBoxColor(FastFood, 0);
	TextDrawSetShadow(FastFood, 0);
	TextDrawSetOutline(FastFood, 1);
	TextDrawBackgroundColor(FastFood, 51);
	TextDrawFont(FastFood, 1);
	TextDrawSetProportional(FastFood, 1);

	Girls = TextDrawCreate(365.333435, 332.681640, "Girly Girls");
	TextDrawLetterSize(Girls, 0.449999, 1.600000);
	TextDrawTextSize(Girls, 448.333343, -5.392592);
	TextDrawAlignment(Girls, 1);
	TextDrawColor(Girls, -16711681);
	TextDrawUseBox(Girls, true);
	TextDrawBoxColor(Girls, 0);
	TextDrawSetShadow(Girls, 0);
	TextDrawSetOutline(Girls, 1);
	TextDrawBackgroundColor(Girls, 51);
	TextDrawFont(Girls, 1);
	TextDrawSetProportional(Girls, 1);

	LSPD = TextDrawCreate(465.000122, 333.511199, "LSPD");
	TextDrawLetterSize(LSPD, 0.449999, 1.600000);
	TextDrawTextSize(LSPD, 501.333343, -0.829629);
	TextDrawAlignment(LSPD, 1);
	TextDrawColor(LSPD, 41215);
	TextDrawUseBox(LSPD, true);
	TextDrawBoxColor(LSPD, 0);
	TextDrawSetShadow(LSPD, 0);
	TextDrawSetOutline(LSPD, 1);
	TextDrawBackgroundColor(LSPD, 51);
	TextDrawFont(LSPD, 1);
	TextDrawSetProportional(LSPD, 1);

	Vagos = TextDrawCreate(522.333435, 334.340698, "Vagos");
	TextDrawLetterSize(Vagos, 0.449999, 1.600000);
	TextDrawTextSize(Vagos, 571.333312, 89.599983);
	TextDrawAlignment(Vagos, 1);
	TextDrawColor(Vagos, -65281);
	TextDrawUseBox(Vagos, true);
	TextDrawBoxColor(Vagos, 0);
	TextDrawSetShadow(Vagos, 0);
	TextDrawSetOutline(Vagos, 1);
	TextDrawBackgroundColor(Vagos, 51);
	TextDrawFont(Vagos, 1);
	TextDrawSetProportional(Vagos, 1);

	Hobo = TextDrawCreate(588.666564, 334.340789, "Hobo");
	TextDrawLetterSize(Hobo, 0.449999, 1.600000);
	TextDrawTextSize(Hobo, 631.999877, -18.666669);
	TextDrawAlignment(Hobo, 1);
	TextDrawColor(Hobo, -1523963137);
	TextDrawUseBox(Hobo, true);
	TextDrawBoxColor(Hobo, 0);
	TextDrawSetShadow(Hobo, 0);
	TextDrawSetOutline(Hobo, 1);
	TextDrawBackgroundColor(Hobo, 51);
	TextDrawFont(Hobo, 1);
	TextDrawSetProportional(Hobo, 1);
I made the box pure colour to see where they are and this is what it looks like:



Re: All textdraws are selecting! - Pawnify - 01.03.2016

I'm using iPleomax textdraw editor, then using the size thing and making the box cover the text. But when I go to my server, add it then hover over it.. it's the selection is not where the box is.


Re: All textdraws are selecting! - ZToPMaN - 01.03.2016

I can help you making some thing like that,i will learn you too.
If you are intersted, feel free to give me a pm.


Re: All textdraws are selecting! - Pawnify - 01.03.2016

Quote:
Originally Posted by ZToPMaN
View Post
I can help you making some thing like that,i will learn you too.
If you are intersted, feel free to give me a pm.
I've just set it manually, as iPleomax was bugging out.

I've sorted it now, thanks though.