Player textdraw problem - 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: Player textdraw problem (
/showthread.php?tid=634401)
Player textdraw problem -
pollo97 - 18.05.2017
Hi,
I haven't be able to detect when the escape key was pressed also with this code that I've find in this forum:
Код:
public OnPlayerClickTextDraw(playerid, Text:clickedid)
{
if(_:clickedid == INVALID_TEXT_DRAW)
{
//Do stuff
}
return 1;
}
I used playertextdraw not normal textdraw.
Thanks in advance
Re: Player textdraw problem -
Feynman - 18.05.2017
Код HTML:
public OnPlayerClickPlayerTextDraw(playerid, PlayerText: playertextid)
{
if(playertextid == PlayerText: INVALID_TEXT_DRAW)
{
//do
}
return 1;
}
Re: Player textdraw problem -
Dayrion - 18.05.2017
Removed.
Re: Player textdraw problem -
pollo97 - 18.05.2017
Quote:
Originally Posted by Dayrion
Removed.
|
What?
Re: Player textdraw problem -
pollo97 - 18.05.2017
Quote:
Originally Posted by Feynman
Код HTML:
public OnPlayerClickPlayerTextDraw(playerid, PlayerText: playertextid)
{
if(playertextid == PlayerText: INVALID_TEXT_DRAW)
{
//do
}
return 1;
}
|
Also OnPlayerClickPlayerTextDraw isn't called, I just tried
Re: Player textdraw problem -
NaS - 18.05.2017
What you posted should work fine, OnPlayerClickTextDraw is called with clickedid being 65535 (0xFFFF aka INVALID_TEXT_DRAW) if the player presses ESC (any TextDraw Selection, thus it doesn't matter if PlayerTextDraws or regular TextDraws are shown).
So the problem must be somewhere else. Make sure other scripts return 0 in this callback (especially when there are checks for ESC, people falsely return 1 often).
Re: Player textdraw problem -
pollo97 - 19.05.2017
Quote:
Originally Posted by NaS
What you posted should work fine, OnPlayerClickTextDraw is called with clickedid being 65535 (0xFFFF aka INVALID_TEXT_DRAW) if the player presses ESC (any TextDraw Selection, thus it doesn't matter if PlayerTextDraws or regular TextDraws are shown).
So the problem must be somewhere else. Make sure other scripts return 0 in this callback (especially when there are checks for ESC, people falsely return 1 often).
|
Problem is that the event isn't even called