SA-MP Forums Archive
I've a question about Click Textdraw. - 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: I've a question about Click Textdraw. (/showthread.php?tid=532843)



I've a question about Click Textdraw. - AfikAtashga - 20.08.2014

Hey,
i'm using clickable textdraw and i've got a problem.

In OnPlayerClickTextDraw i've wrote:
Код:
if(clickedid == Text:INVALID_TEXT_DRAW)
{
 	printf("#1");
	CancelSelectTextDraw(playerid);
	for(new i, j = MAX_PLAYER_SHOP_TD; i < j; i++) PlayerTextDrawHide(playerid, SHOP_TD[playerid][i]);
	for(new i = 11; i <= 15; i++) TextDrawHideForPlayer(playerid, GLOBAL_TD[i]);
 }
First, it wrote alot of times "#1" in the console,
In first time to use it work great,
Second time i've trying to use any clicked textdraw, PLAYER / GLOBAL, it's just not work. Like automatically it's INVALID_TEXT_DRAW.

HELP?


Re: I've a question about Click Textdraw. - AfikAtashga - 18.09.2014

UP..


Re: I've a question about Click Textdraw. - SilentSoul - 18.09.2014

Actually because the INVALID_TEXT_DRAW not being called when player click a player textdraw.
Quote:

When a player presses ESC to cancel selecting a textdraw, OnPlayerClickTextDraw is called with a textdraw ID of 'INVALID_TEXT_DRAW'. OnPlayerClickPlayerTextDraw won't be called also.

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


Re: I've a question about Click Textdraw. - AfikAtashga - 18.09.2014

Quote:
Originally Posted by SilentSoul
Посмотреть сообщение
Actually because the INVALID_TEXT_DRAW not being called when player click a player textdraw.

https://sampwiki.blast.hk/wiki/OnPlayerClickPlayerTextDraw
But i'm not talking on player textdraw.


Re: I've a question about Click Textdraw. - ranme15 - 18.09.2014

I've got the same problem, when I put a code like yours in the top on the public, it doesn't let me even 'show' the textdraw (closes straight after I show it).


Re: I've a question about Click Textdraw. - AfikAtashga - 19.09.2014

Quote:
Originally Posted by ******
Посмотреть сообщение
Same with globals.
YOU ARE NOT HELPING..
Quote:
Originally Posted by ranme15
Посмотреть сообщение
I've got the same problem, when I put a code like yours in the top on the public, it doesn't let me even 'show' the textdraw (closes straight after I show it).
YEP, It show the TD and shortly after it disappear.