SA-MP Forums Archive
Help on 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: Help on TextDraw (/showthread.php?tid=625941)



Help on TextDraw - hoanduy - 08.01.2017

I want to press the ESC, it would hide it to do TextDraw.
I need someone who knows about TextDraw help me.

P/s:
I'm sorry that I'm not good at English. And what I wrote all through ****** translate


Re: Help on TextDraw - BiosMarcel - 08.01.2017

Here, a list of detectable keys: https://sampwiki.blast.hk/wiki/Keys
ESC is not one of those.


Re: Help on TextDraw - SickAttack - 08.01.2017

If you're talking about pressing ESC while SelectTextDraw is enabled, check if the clicked TextDraw ID is invalid under OnPlayerClickTextDraw and then hide the desired TextDraws (use a variable to detect which set the player is interacting with).


Re: Help on TextDraw - hoanduy - 08.01.2017

Can you give me an example code does not?


Re: Help on TextDraw - hoanduy - 08.01.2017

Quote:
Originally Posted by SickAttack
Посмотреть сообщение
If you're talking about pressing ESC while SelectTextDraw is enabled, check if the clicked TextDraw ID is invalid under OnPlayerClick(Player)TextDraw and then hide the desired TextDraws (use a variable to detect which set the player is interacting with).
When I hide it when I use the command does not appear again


Re: Help on TextDraw - SickAttack - 08.01.2017

pawn Код:
public OnPlayerClickTextDraw(playerid, Text:clickedid)
{
    if(_:clickedid == INVALID_TEXT_DRAW)
    {
        // Hide here
    }
    return 1;
}



Re: Help on TextDraw - hoanduy - 08.01.2017

Quote:
Originally Posted by SickAttack
Посмотреть сообщение
pawn Код:
public OnPlayerClickTextDraw(playerid, Text:clickedid)
{
    if(_:clickedid == INVALID_TEXTDRAW_ID)
    {
        // Hide here
    }
    return 1;
}
Thank you. But The purpose of "_:" is used to doing ?
I use this
f(clickedid == INVALID_TEXT_DRAW)


Re: Help on TextDraw - SickAttack - 08.01.2017

Quote:
Originally Posted by hoanduy
Посмотреть сообщение
Thank you. But The purpose of "_:" is used to doing ?
I use this
f(clickedid == INVALID_TEXT_DRAW)
Remove "Text:" tag.


Re: Help on TextDraw - BiosMarcel - 08.01.2017

Sorry for providing half true information

Quote:
Originally Posted by SickAttack
Посмотреть сообщение
pawn Код:
public OnPlayerClickTextDraw(playerid, Text:clickedid)
{
    if(_:clickedid == INVALID_TEXTDRAW_ID)
    {
        // Hide here
    }
    return 1;
}
Does it just detect ESC or would the same happen if he pressed KEY_NO for example?


Re: Help on TextDraw - SickAttack - 08.01.2017

Quote:
Originally Posted by [Bios]Marcel
Посмотреть сообщение
Sorry for providing half true information



Does it just detect ESC or would the same happen if he pressed KEY_NO for example?
ESC.