Textdraws cant selectable ?
#1

Hey Guys,

i have a Problem with my selectable Textdraw.. i cant click on it

Code:

Код:
new Text:LKW;

LKW = TextDrawCreate(229,172,"- Lastkraftwagen Fuererschein");
TextDrawLetterSize(LKW,0.300000,1.000000);
TextDrawColor(LKW,Weiss);



public OnPlayerClickTextDraw(playerid, Text:clickedid)
{
	if(_:clickedid != INVALID_TEXT_DRAW) //Sagt das wenn der Player ein falsches TD anklickt nichts passieren soll.
	{
		if(clickedid == Text:LKW)
		{
			SendClientMessage(playerid,Weiss,"Es klappt");
		    SelectTextDraw(playerid,Rot);
		    return 1;
		}
	}
	return 1;
}

// if Player press key N than comes the Textdraw..

TextDrawShowForPlayer(playerid,LKW);
TextDrawSetSelectable(LKW,true);
Reply
#2

You have to use TextDrawTextSize() to set the selectable area if you aren't using a box.
Reply
#3

This has to be a top 10 related scripting question I think people must have difficulty wrapping their heads around TextDrawTextSize().
Reply
#4

Thanks,
how can i get this Size Float and Y ? if i try blind, so than are my Textdraw looks so:

-
Hello
what
is
?
-.-
Reply
#5

If your using a textdraw editor turn the box on this will represent your x-clickable area the y-clickable area you'll need to guess usually between 10 - 20 it depends on the size of the text. I use Zamerohts editor turn the box on set the size then guess at the y.
Reply
#6

It's honestly just a guessing game when it comes to setting the right clickable area. I find it easier to make the TD's in a filter-script with a command to show/hide them and then you can change the clickable areas quite easily that way.
Reply
#7

I think you get a pretty good feel after making a few hundred TD's RC
Reply
#8

Quote:
Originally Posted by [uL]Pottus
Посмотреть сообщение
I think you get a pretty good feel after making a few hundred TD's RC
Oh believe me, I know!
Reply


Forum Jump:


Users browsing this thread: