Force SelectTextDraw
#1

I've made an Registration Textdraw which is needed to clicked on.
But if I press ESC my Cursor disappears.

Is there a way to force SelectTextDraw to stay until the user have made his click?
Reply
#2

https://sampwiki.blast.hk/wiki/OnPlayerClickTextDraw

clickedid The ID of the clicked textdraw. INVALID_TEXT_DRAW if selection was cancelled.

Therefore.

pawn Код:
static MyTextDrawOpen[MAX_PLAYERS];
static AllowMyTextDrawClose[MAX_PLAYERS];

public OnPlayerClickTextDraw(playerid, Text:clickedid)
{
    if(clickedid == INVALID_TEXT_DRAW)
    {
        // Action to perform on this textdraw when closing
        if(MyTextDrawOpen[playerid])
        {
            // Textdraws allowed to close
            if(AllowMyTextDrawClose[playerid]) MyTextDrawOpen[playerid] = false;

            // Textdraws not allowed to close yet
            else SelectTextDraw(playerid, 0x00FF00FF);
        }
    }
    return 1;
}
Reply
#3

> helped me very much ty
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)