SA-MP Forums Archive
Player 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: Player Textdraw (/showthread.php?tid=516596)



Player Textdraw - AiRaLoKa - 01.06.2014

hi all...

how can i remove the player's textdraw when they pressed the Esc button? I need it becouse when they pressed the Esc button, their cursor is gone, and they need to type the command again to show their cursor again...

any suggestion


Re: Player Textdraw - AiRaLoKa - 05.06.2014

sorry for bumping...

but it's already 5 day, and there is nobody helping me...


Re: Player Textdraw - s0nic - 05.06.2014

Maybe this can help you:
https://sampwiki.blast.hk/wiki/OnPlayerClickPlayerTextDraw
Quote:

When a player presses ESC to cancel selecting a textdraw, OnPlayerClickTextDraw is called with a textdraw ID of 'INVALID_TEXT_DRAW'. OnPlayerClickPlayerTextDraw won't be called also.




Re: Player Textdraw - AiRaLoKa - 05.06.2014

i meant how can i remove the textdraw when playe pressed ESC key...
becouse when they pressed the ESC key, their cursor gone, and cannot click the close button


Re: Player Textdraw - sl!x - 05.06.2014

why dont you do it like this with LMB
PHP код:
public OnPlayerKeyStateChange(playeridnewkeysoldkeys)
{
    if (
PRESSED(KEY_FIRE))
    {
        
TextDrawHideForPlayer(playeridyourtextdraw);
    }
    return 
1;




Re: Player Textdraw - s0nic - 05.06.2014

I'm quite aware of what you were asking..
Which is why I suggested that, if it works how I'm thinking you can try handling it like this:
pawn Код:
public OnPlayerClickTextDraw(playerid, Text:clickedid)
{
    if(clickedid == INVALID_TEXT_DRAW)
    {
        PlayerTextDrawHide/PlayerTextDrawDestroy //However you want to remove it.
    }
}



Re: Player Textdraw - AiRaLoKa - 05.06.2014

Quote:
Originally Posted by s0nic
Посмотреть сообщение
I'm quite aware of what you were asking..
Which is why I suggested that, if it works how I'm thinking you can try handling it like this:
pawn Код:
public OnPlayerClickTextDraw(playerid, Text:clickedid)
{
    if(clickedid == INVALID_TEXT_DRAW)
    {
        PlayerTextDrawHide/PlayerTextDrawDestroy //However you want to remove it.
    }
}
my close button is just fine... but i want to hide all textdraw when they click the ESC button


Re: Player Textdraw - BroZeus - 05.06.2014

i dont think there is way to detect pressing of escape key now


Re: Player Textdraw - AiRaLoKa - 05.06.2014

Quote:
Originally Posted by BroZeus
Посмотреть сообщение
i dont think there is way to detect pressing of escape key now
yeah that's why ai asked it here....

but how do mSelection do it?


Re: Player Textdraw - BroZeus - 05.06.2014

whats mselction can u show its script?