Please help me about Textdraw - 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: Please help me about Textdraw (
/showthread.php?tid=646319)
Please help me about Textdraw -
hoanduy - 14.12.2017
I have a TextDraw type CreatePlayerTextDraw, when I use the / test command, it will display TextDraw, but when I press ESC it is still there. So when I press ESC it will hide TextDraw, I need someone who can help me, please.
Re: Please help me about Textdraw -
RogueDrifter - 14.12.2017
The textdraw wont just disappear by pressing ESC on its own you have to add that perhaps onplayerkeystatechange and visit
Samp Keys Wiki
for the samp keys and using hidetextdrawforplayer
Samp Wiki Textdraw (Hide)
Re: Please help me about Textdraw -
Eoussama - 14.12.2017
I hope this helps.
PHP код:
public OnPlayerClickTextDraw(playerid, Text:clickedid)
{
if(Text:INVALID_TEXT_DRAW == clickedid)
TextDrawHideForPlayer(playerid, clickedid)
return 1;
}
Re: Please help me about Textdraw -
hoanduy - 14.12.2017
Quote:
Originally Posted by RogueDrifter
The textdraw wont just disappear by pressing ESC on its own you have to add that perhaps onplayerkeystatechange and visit Samp Keys Wiki
for the samp keys and using hidetextdrawforplayer Samp Wiki Textdraw (Hide)
|
Quote:
Originally Posted by Eoussama
I hope this helps.
PHP код:
public OnPlayerClickTextDraw(playerid, Text:clickedid)
{
if(Text:INVALID_TEXT_DRAW == clickedid)
TextDrawHideForPlayer(playerid, clickedid)
return 1;
}
|
But my is OnPlayerClickPlayerTextDraw
Re: Please help me about Textdraw -
Eoussama - 15.12.2017
adapt it with it then,
Re: Please help me about Textdraw -
jasperschellekens - 15.12.2017
Quote:
Originally Posted by hoanduy
But my is OnPlayerClickPlayerTextDraw
|
public OnPlayerClickPlayerTextDraw(playerid, Text:clickedid)
{
if(clickedid == Text:INVALID_TEXT_DRAW)
{
TextDrawHideForPlayer(playerid, Textdraw0)
// add your textdraws here
}
return 1;
}
Re: Please help me about Textdraw -
hoanduy - 15.12.2017
Thanks All
Re: Please help me about Textdraw -
NaS - 15.12.2017
Quote:
Originally Posted by jasperschellekens
public OnPlayerClickPlayerTextDraw(playerid, Text:clickedid)
{
if(clickedid == Text:INVALID_TEXT_DRAW)
{
TextDrawHideForPlayer(playerid, Textdraw0)
// add your textdraws here
}
return 1;
}
|
That won't work. OnPlayerClickPlayerTextDraw isn't called when cancelling TD selection, only OnPlayerClickTextDraw.
SelectTextDraw is for both, global and per-player TextDraws so it wouldn't make any sense calling both callbacks.