PlayerTextDrawSetSelectable
#1

Hello, I'm one doubts that brings me problems, here one can click on TextDraw, up to and quiet, but when she presses the ESC key, disables "PlayerTextDrawSetSelectable" and the buga person, how can I activate something when a person presses the esc not disable anything?
Reply
#2

PHP код:
public OnPlayerClickTextDraw(playeridText:clickedid)
{
  if(
_:clickedid == INVALID_TEXT_DRAW) return CallLocalFunction("OnPlayerClickPlayerTextDraw""ii"playeridINVALID_TEXT_DRAW);
  return 
1;

Reply
#3

Quote:
Originally Posted by KillerDVX
Посмотреть сообщение
PHP код:
public OnPlayerClickTextDraw(playeridText:clickedid)
{
  if(
_:clickedid == INVALID_TEXT_DRAW) return CallLocalFunction("OnPlayerClickPlayerTextDraw""ii"playeridINVALID_TEXT_DRAW);
  return 
1;

Does not work friend..
Reply
#4

You can't detect pressing the ESC key as far as I know and ESC will always trigger the cancellation of using the mouse to click a textdraw.
The only suggestion I would make is implementing the code below which will reset the mouse when you press SPACE

Код:
#define PRESSED(%0) \
	(((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))

public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
	if(PRESSED(KEY_SPRINT))
	{
		CancelSelectTextDraw(playerid);
		SelectTextDraW(playerid);
	}
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)