Clickable textdraw problem.
#1

Hi.
I have this textdraw
pawn Код:
Textdrawinserirecarta7 = TextDrawCreate(254.095336, 314.026611, "Inserire la carta di credito.");
TextDrawLetterSize(Textdrawinserirecarta7, 0.259142, 1.254400);
TextDrawTextSize(Textdrawinserirecarta7, 378.285797, -42.239997);
TextDrawAlignment(Textdrawinserirecarta7, 1);
TextDrawColor(Textdrawinserirecarta7, -1);
TextDrawUseBox(Textdrawinserirecarta7, true);
TextDrawBoxColor(Textdrawinserirecarta7, 255);
TextDrawSetShadow(Textdrawinserirecarta7, 0);
TextDrawSetOutline(Textdrawinserirecarta7, 1);
TextDrawBackgroundColor(Textdrawinserirecarta7, 51);
TextDrawFont(Textdrawinserirecarta7, 1);
TextDrawSetProportional(Textdrawinserirecarta7, 1);
TextDrawSetSelectable(Textdrawinserirecarta7, true);
But when I do the SelectTextDraw, it's not selectable.
What can I do?
Reply
#2

Only thing I can think of right now, did you keep this warning in mind?

Quote:
Originally Posted by SA-MP Wiki
TextDrawSetSelectable must be used BEFORE the textdraw is shown to players for it to be selectable.
Rest of the code look good as far as I can see. I also had a problem that multiple textdraws got selected after hovering over them, it ended up to be because I didn't set the box size or something, maybe someone else can elaborate on that..

EDIT: Yes, exactly that what the 2 replies below me said. That was the same solution I had to use when I had problems
Reply
#3

Your Text Size is negative! Also read that to convert the letter size to text size

https://sampwiki.blast.hk/wiki/TextDrawLetterSize

TextSize Y ~ LetterSize Y / 0.135 to fit the box for ONE LINE

The selectable box isn't the visible box!, the selectable box only uses Text Size
Reply
#4

TextDrawTextSize(Textdrawinserirecarta7, 378.285797, -42.239997);

The "Y" is negative, try changing it to 10 - 20. It's fine.

Reply
#5

Thank you Nero_3D and KillerDVX, now it works.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)