SA-MP Forums Archive
pressing esc while selecting textdraw prob - 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: pressing esc while selecting textdraw prob (/showthread.php?tid=447193)



pressing esc while selecting textdraw prob - drichie - 29.06.2013

can someone help me with this i cant determine what is to be done when a player press esc the pointer will not disappear and he will force to choose one of the option

NOTE: CancelSelectTextDraw will automatically call OnPlayerClickTextDraw
pressing ESC will automatically call CancelSelectTextDraw

here is my code
pawn Код:
public OnPlayerClickTextDraw(playerid, Text:clickedid)
{
    if(clickedid != Text:INVALID_TEXT_DRAW)
    {
        if(clickedid == Textdraw9)
        {
            SCM(playerid,-1,"click 1");
            //HideSelectSkill(playerid);
        }
        else if(clickedid == Textdraw10)
        {
            SCM(playerid,-1,"click 2");
            //HideSelectSkill(playerid);
        }
        else if(clickedid == Textdraw11)
        {
            SCM(playerid,-1,"click 3");
            //HideSelectSkill(playerid);
        }
        else if(clickedid == Textdraw12)
        {
            SCM(playerid,-1,"click 4");
            //HideSelectSkill(playerid);
        }
        else if(clickedid == Textdraw13)
        {
            SCM(playerid,-1,"click 5");
            //HideSelectSkill(playerid);
        }
        else if(clickedid == Textdraw14)
        {
            SCM(playerid,-1,"click 6");
            //HideSelectSkill(playerid);
        }
        else if(clickedid == Textdraw15)
        {
            SCM(playerid,-1,"click 7");
            //HideSelectSkill(playerid);
        }
        else if(clickedid == Textdraw16)
        {
            SCM(playerid,-1,"click 8");
            //HideSelectSkill(playerid);
        }
        else if(clickedid == Textdraw17)
        {
            SCM(playerid,-1,"click 9");
            //HideSelectSkill(playerid);
        }
        else if(clickedid == Textdraw18)
        {
            SCM(playerid,-1,"click 10");
            //HideSelectSkill(playerid);
        }
        CancelSelectTextDraw(playerid);
        HideSelectSkill(playerid);
    }
    return 1;
}



Re: pressing esc while selecting textdraw prob - magnusburton - 29.06.2013

So you want a script that determines when a player presses ESC and that should trigger one of the textdraws in the callback OnPlayerClickTextDraw. Correct?


Re: pressing esc while selecting textdraw prob - Anak - 29.06.2013

this will hide pointer.
pawn Код:
CancelSelectTextDraw(playerid);