SA-MP Forums Archive
Clickable Textdraw not working - 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: Clickable Textdraw not working (/showthread.php?tid=401102)



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.500000229.900000"usebox");
TextDrawLetterSize(Test0.0000001.190277);
TextDrawTextSize(Test300.5000000.000000);
TextDrawAlignment(Test1);
TextDrawColor(Test0);
TextDrawUseBox(Testtrue);
TextDrawBoxColor(Test134746623);
TextDrawSetShadow(Test0);
TextDrawSetOutline(Test0);
TextDrawFont(Test0);
TextDrawSetSelectable(Test1); 
Then when the user executes a command it is displayed:
PHP код:
TextDrawShowForPlayer(playeridTest); 
And finaly I start the selection with:
PHP код:
SelectTextDraw(playeridCOLOR); 
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.