Click on TD trouble
#1

Doesn't works. Is not highlighted (SelectTextDraw) and nothing. I made it by iPleomax's textdraw editor so everything should be okay.
What is wrong?
Код:
	mainmenu7  = TextDrawCreate( 92.062500, 340.375000, "Race!");
	TextDrawLetterSize( mainmenu7 , 0.340997, 1.114374);
	TextDrawTextSize( mainmenu7 , 199.000000, -6.562500);
	TextDrawAlignment( mainmenu7 , 1);
	TextDrawColor( mainmenu7 , -1);
	TextDrawUseBox( mainmenu7 , true);
	TextDrawBoxColor( mainmenu7 , -16777179);
	TextDrawSetShadow( mainmenu7 , 0);
	TextDrawSetOutline( mainmenu7 , 1);
	TextDrawBackgroundColor( mainmenu7 , 51);
	TextDrawFont( mainmenu7 , 1);
	TextDrawSetProportional( mainmenu7 , 1);
	TextDrawSetSelectable( mainmenu7 , true);
By the way - possible is call SelectTextDraw by click ESC? I want to make it unable to disable.
Reply
#2

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

Quote:

The clickable area is defined by TextDrawTextSize. The x and y parameters passed to that function must not be zero or negative.

You have Y value negative, change it.
Reply
#3

Great.
But here still not works.
Код:
	mainmenu13  = TextDrawCreate( 582.500000, 387.812500, "broadcast");
	TextDrawLetterSize( mainmenu13 , 0.000000, 1.586109);
	TextDrawTextSize( mainmenu13 , 467.500000, 20.000000);
	TextDrawAlignment( mainmenu13 , 1);
	TextDrawColor( mainmenu13 , 0);
	TextDrawUseBox( mainmenu13 , true);
	TextDrawBoxColor( mainmenu13 , 0);
	TextDrawSetShadow( mainmenu13 , 0);
	TextDrawSetOutline( mainmenu13 , 0);
	TextDrawFont( mainmenu13 , 0);
	TextDrawSetSelectable( mainmenu13 , true);
And repeat:
Quote:

By the way - possible is call SelectTextDraw by click ESC? I want to make it unable to disable.

Reply
#4

TextDrawLetterSize also must be positive, more than 0.0 - I recommend iTD script to textdraws if you have problem with clickable area.

Quote:

By the way - possible is call SelectTextDraw by click ESC? I want to make it unable to disable.

Yes, this is possible. Callback OnPlayerClickTextDraw is called when you click ESC with clicked value INVALID_TEXT_DRAW, so

Код:
if(clickedid == Text:INVALID_TEXT_DRAW)
{
//player clicked ESC, here you can use SelectTextDraw again
}
Reply
#5

Quote:
Originally Posted by ball
Посмотреть сообщение
TextDrawLetterSize also must be positive, more than 0.0 - I recommend iTD script to textdraws if you have problem with clickable area.



Yes, this is possible. Callback OnPlayerClickTextDraw is called when you click ESC with clicked value INVALID_TEXT_DRAW, so

Код:
if(clickedid == Text:INVALID_TEXT_DRAW)
{
//player clicked ESC, here you can use SelectTextDraw again
}
Okay but when I'll change Y position to more than 0.0 - ex. 50 then it's still not working.
Reply
#6

anyone please?
Reply
#7

try bro

pawn Код:
TextDrawTextSize( mainmenu13 , 40.500000, 50.000000);
Reply
#8

still not works! :/
Reply
#9

where you have used
pawn Код:
SelectTextDraw(playerid, COLOR);
?

Paste codes
Reply
#10

I have it in OnPlayerConnect and much another clickable textdraws which works.
this is everything what i got about that not working textdraw. only box without color - with it not working too.
Код:
	mainmenu13  = TextDrawCreate( 582.500000, 387.812500, "broadcast");
	TextDrawLetterSize( mainmenu13 , 0.000000, 1.586109);
	TextDrawTextSize( mainmenu13 , 467.500000, 20.000000);
	TextDrawAlignment( mainmenu13 , 1);
	TextDrawColor( mainmenu13 , 0);
	TextDrawUseBox( mainmenu13 , true);
	TextDrawBoxColor( mainmenu13 , 0);
	TextDrawSetShadow( mainmenu13 , 0);
	TextDrawSetOutline( mainmenu13 , 0);
	TextDrawFont( mainmenu13 , 0);
	TextDrawSetSelectable( mainmenu13 , true);
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)