SA-MP Forums Archive
Bug? with selectable textdraws - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP (https://sampforum.blast.hk/forumdisplay.php?fid=3)
+--- Forum: Bug Reports (https://sampforum.blast.hk/forumdisplay.php?fid=20)
+--- Thread: Bug? with selectable textdraws (/showthread.php?tid=582565)



Bug? with selectable textdraws - Midzi - 21.07.2015

Hey.

I don't know it's a bug but..

If we have enabled select textdraw:
Код:
SelectTextDraw(...);
and we push ESC - we can't do anything - cursor disappear.
We can't detect ESC key (OnPlayerKeyStateChange) because SA-MP doesn't support this.

What we can to do?


Re: Bug? with selectable textdraws - Michalec - 21.07.2015

When you click ESC, https://sampwiki.blast.hk/wiki/OnPlayerClickTextDraw is called with clickedid = INVALID_TEXT_DRAW


Re: Bug? with selectable textdraws - Midzi - 21.07.2015

It's make no sense, and it's too difficult for scripters...
What if I have 100+ selectable textdraws? (WTF?!)
I must check all of them? It's really make no sense.


Re: Bug? with selectable textdraws - GTLS - 21.07.2015

or you can simplly use OnPlayerClickTextDraw {if i am not wrong} and under it use TD ids as in dialog ids..
like,
PHP код:
 if(textdrawid == TD_HELP)
{
  return 
cmd_help(playeridparams);




Re: Bug? with selectable textdraws - Midzi - 21.07.2015

But there's another bug?

If I check textdraws:
Код:
if(clickedid == Text:INVALID_TEXT_DRAW) // Without Text: = tag mismatch
my textdraws closed. In first time nothing doing, but second time - textdraws hided.

What? ;o


PS. Ok my bad..