SA-MP Forums Archive
ESC - call OnPlayerClickPlayerTextDraw - 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: ESC - call OnPlayerClickPlayerTextDraw (/showthread.php?tid=489028)



ESC - call OnPlayerClickPlayerTextDraw - Riddick94 - 20.01.2014

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

This callback is called when a player clicks on a textdraw or cancels the select mode(ESC).

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

This callback is called when a player clicks on a player-textdraw. It is not called when player cancels the select mode (ESC) - however, OnPlayerClickTextDraw is.

Most of us, are using Per-Player TextDraws now, and some us makes them selectable, bad things happens when player press ESC key while he's in selecting mode. Would be nice to see OnPlayerClickPlayerTextDraw called when user cancels the select mode to avoid problems.


Re: ESC - call OnPlayerClickPlayerTextDraw - ][Noname][ - 20.01.2014

No, there is no any problems
You easy can track press ESC


Re: ESC - call OnPlayerClickPlayerTextDraw - iJumbo - 20.01.2014

Quote:
Originally Posted by Hiddos
Посмотреть сообщение
Well you could just do:
pawn Код:
public OnPlayerClickTextDraw(playerid, Text:clickedid)
{
  if(_:clickedid == INVALID_TEXT_DRAW) return CallLocalFunction("OnPlayerClickPlayerTextDraw", "ii", playerid, INVALID_TEXT_DRAW);
  return 1;
}
4chars


Re: ESC - call OnPlayerClickPlayerTextDraw - Riddick94 - 20.01.2014

Quote:
Originally Posted by iJumbo
Посмотреть сообщение
4chars
Hoolly, I didn't thought about this! That actually works, thanks!

edit:\\
But actually CancelSelectTextDraw is calling INVALID_TEXTDRAW_ID, so still, I have to use boolen array for that. Thanks anyway.