I've a question about Click Textdraw.
#1

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

UP..
Reply
#3

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

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

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).
Reply
#6

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


Forum Jump:


Users browsing this thread: 1 Guest(s)