Player Textdraw
#1

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
Reply
#2

sorry for bumping...

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

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.

Reply
#4

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
Reply
#5

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

Reply
#6

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.
    }
}
Reply
#7

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
Reply
#8

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

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?
Reply
#10

whats mselction can u show its script?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)