Textdraws cant selectable ? - 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: Textdraws cant selectable ? (
/showthread.php?tid=439276)
Textdraws cant selectable ? -
K3VIN - 24.05.2013
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);
Re: Textdraws cant selectable ? -
Scenario - 24.05.2013
You have to use TextDrawTextSize() to set the selectable area if you aren't using a box.
Re: Textdraws cant selectable ? -
Pottus - 24.05.2013
This has to be a top 10 related scripting question I think people must have difficulty wrapping their heads around TextDrawTextSize().
AW: Textdraws cant selectable ? -
K3VIN - 24.05.2013
Thanks,
how can i get this Size Float

and Y ? if i try blind, so than are my Textdraw looks so:
-
Hello
what
is
?
-.-
Re: Textdraws cant selectable ? -
Pottus - 24.05.2013
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.
Re: Textdraws cant selectable ? -
Scenario - 24.05.2013
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.
Re: Textdraws cant selectable ? -
Pottus - 24.05.2013
I think you get a pretty good feel after making a few hundred TD's RC
Re: Textdraws cant selectable ? -
Scenario - 24.05.2013
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!