Pressing ESC - OnPlayerClickPlayerTextdraw
#1

Hello there,


I want that when player presses ESC if its a PLAYERTEXTDRAW it will be canceled, I tried several times and searched a lot and I really COULDN'T understand, can anyone fix up my code without telling me to read something!

Thanks in advance
The code:

pawn Код:
public OnPlayerClickPlayerTextDraw(playerid, PlayerText:playertextid)
{
    if(ShowingStats[playerid])
    {
        if(_:playertextid == Textdraw28 )
        {
            CancelSelectTextDraw(playerid);
            HidePlayerStatusTextDraws(playerid);
            return 1;
        }
    }
    return 1;
}

pawn Код:
public OnPlayerClickTextDraw(playerid, Text:clickedid)
{
    if(ShowingStats[playerid])
    {
        if(_:clickedid == INVALID_TEXT_DRAW)
        {
            CancelSelectTextDraw(playerid);
            HidePlayerStatusTextDraws(playerid);
        }
        return 1;
    }
    return 0;
}
Fix the codes! thanks buddies
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)