Detecting ESC Key while Selecting Textdraws
#9

Quote:
Originally Posted by InfiniTy.
Посмотреть сообщение
Under the OnPlayerClickTextDraw callback

pawn Код:
if(clickedid == Text:INVALID_TEXT_DRAW) {
   //do stuff
}
It's still correct, both global and per-player textdraws call OnPlayerClickTextDraw for the ESC detection.

pawn Код:
public OnPlayerClickTextDraw( playerid, Text: clickedid )
{
    if( clickedid == Text: INVALID_TEXT_DRAW )
    {
        PlayerTextDrawHide( playerid, ... );
        // code..
        return 1;
    }
    return 0;
}

public OnPlayerClickPlayerTextDraw( playerid, PlayerText: playertextid )
{
    if( playertextid == ... )
    {
        // code..
        CancelSelectTextDraw( playerid );
    }
    return 0;
}
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)