Detecting ESC Key while Selecting Textdraws
#5

OnPlayerClickTextDraw

If this callback returns INVALID_TEXT_DRAW.
For example, lets say you open textdraw 1 for selection:
pawn Код:
SelectTextDraw(playerid, 0xFF0000FF);
PlayerInTDSelection[playerid] = true; //An example
pawn Код:
public OnPlayerClickTextDraw(playerid, Text:clickedid)
{
    if(PlayerInTDSelection[playerid] == true)
    {
        if(clickedid == INVALID_TEXT_DRAW)
        {
            SendClientMessage(playerid, 0xFF0000FF, "You pressed ESC/Cancelled the textdraw selection");
            return 0;
        }
    //rest here
    }
    return 1;
}
This is just an example, and I wouldn't recommend using this code in its entirety in your script. As it may not function as you desire, as it is not a full code.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 6 Guest(s)