PlayerTextDrawSetSelectable - 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: PlayerTextDrawSetSelectable (
/showthread.php?tid=581594)
PlayerTextDrawSetSelectable -
JoshNudock - 14.07.2015
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?
Re : PlayerTextDrawSetSelectable -
KillerDVX - 14.07.2015
PHP код:
public OnPlayerClickTextDraw(playerid, Text:clickedid)
{
if(_:clickedid == INVALID_TEXT_DRAW) return CallLocalFunction("OnPlayerClickPlayerTextDraw", "ii", playerid, INVALID_TEXT_DRAW);
return 1;
}
Re: Re : PlayerTextDrawSetSelectable -
JoshNudock - 14.07.2015
Quote:
Originally Posted by KillerDVX
PHP код:
public OnPlayerClickTextDraw(playerid, Text:clickedid)
{
if(_:clickedid == INVALID_TEXT_DRAW) return CallLocalFunction("OnPlayerClickPlayerTextDraw", "ii", playerid, INVALID_TEXT_DRAW);
return 1;
}
|
Does not work friend..
Re: PlayerTextDrawSetSelectable -
HarrisonC - 14.07.2015
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);
}
}