About OnPlayerClickPlayerTextDraw calls
#1

Well, I made a system which contains menus with textdraws, when it was written using global textdraws, the callback OnPlayerClickTextDraw was called when the the server canceled him textdraw selection.

With per player textdraws it doesn't happens as it should, I need to know when the players leave the selectable mode by all ways possible.

My english is bad, then what I'm trying to say is: OnPlayerClickPlayerTextDraw isn't called when the server cancel your textdraw selection.
Reply
#2

Yes, OnPlayerClickTextDraw is called when he cancels the textdraw selection.
Reply
#3

By pressing Esc while selecting global textdraw the callback OnPlayerCLlickTextDraw is called holding an invalid text draw id(65535), but if you press Esc while selecting per-player textdraw the callback OnPlayerClickPlayerTextDraw is not called.
Reply
#4

When 'stopping' to select a textdraw of any kind - normal or player - OnPlayeClickTextDraw gets called (Not OnPlayerClickPlayerTextDraw) with INVALID_TEXT_ID
Reply
#5

Thanks for the info but it's stranger, everyone expects that it's being called by OnPlayerClickPlayerTextDraw.
Reply
#6

No, why would it?

If you're making a player select a textdraw, players can either click on player textdraws or normal textdraws, guaranteed they are selectable. SelectTextDraw is the only function, there is no SelectPlayerTextDraw or whatever.
Reply
#7

why not make it call both callbacks .... ?
Reply
#8

Quote:
Originally Posted by whitetigerswt
Посмотреть сообщение
why not make it call both callbacks .... ?
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;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)