Clickable Textdraw not working -
mati233 - 21.12.2012
Hi guys,
Is my first time working with clickable textdraws, and I've read all the samp documentation and some tutorials, but I can't get it working.
Here's a simple example.
On game mode init I create the textdraw:
PHP код:
Test=TextDrawCreate(342.500000, 229.900000, "usebox");
TextDrawLetterSize(Test, 0.000000, 1.190277);
TextDrawTextSize(Test, 300.500000, 0.000000);
TextDrawAlignment(Test, 1);
TextDrawColor(Test, 0);
TextDrawUseBox(Test, true);
TextDrawBoxColor(Test, 134746623);
TextDrawSetShadow(Test, 0);
TextDrawSetOutline(Test, 0);
TextDrawFont(Test, 0);
TextDrawSetSelectable(Test, 1);
Then when the user executes a command it is displayed:
PHP код:
TextDrawShowForPlayer(playerid, Test);
And finaly I start the selection with:
PHP код:
SelectTextDraw(playerid, COLOR);
The textdraw is displayed but when I click it OnPlayerClickTextDraw is not called, and it doesn't change his color when I put my mouse hover it....
What am I doing wrong?
I hope somebody could give me a hand here.
Thanks
Re: Clickable Textdraw not working -
DaRk_RaiN - 21.12.2012
Happened for me, if the box is empty it won't work, try normal textdraw.
Re: Clickable Textdraw not working -
mati233 - 21.12.2012
Thanks, now everything is working wonderful, I was not testing it in any normal textdraw, that was the problem.
Hopefuly this thread will help other people as well.
+rep you
Re: Clickable Textdraw not working -
Hayden_Almeida - 15.12.2015
Quote:
Originally Posted by mati233
Thanks, now everything is working wonderful, I was not testing it in any normal textdraw, that was the problem.
Hopefuly this thread will help other people as well.
+rep you
|
Let me say if i understand: if you only create a Box Text Draw, it will not work?
Clickable textdraws only will work if have any words?
Re: Clickable Textdraw not working -
Vince - 15.12.2015
The first thing I look for in "clickable textdraw not working" topics is the
TextDrawTextSize native. It must not be absent and the
width and height must not be 0.