Clickable Textdraw not working
#1

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
Reply
#2

Happened for me, if the box is empty it won't work, try normal textdraw.
Reply
#3

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
Reply
#4

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?
Reply
#5

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)