Textdraw clickable problem
#7

pawn Код:
public OnPlayerClickTextDraw(playerid, Text:clickedid)
{
    if(_:clickedid != INVALID_TEXT_DRAW) // If the player clicked a valid textdraw, continue with the coding. (_:var removes the Text: tag, to avoid tag mismatch)
    {
        if(clickedid == A)
        {
            // Do something
        }
        else if(clickedid == B)
        {
            // Do something
        }
        TextDrawHideForPlayer(playerid, A);
        TextDrawHideForPlayer(playerid, B);
        CancelSelectTextDraw(playerid); // This will indeed call OnPlayerClickTextDraw again, but with an ID of 65535. The code above stops it from resulting in an eternal loop.
    }
    return 1;
}
Reply


Messages In This Thread
Textdraw clickable problem - by Face9000 - 26.01.2014, 11:12
Re: Textdraw clickable problem - by Face9000 - 27.01.2014, 10:06
Re: Textdraw clickable problem - by Sawalha - 27.01.2014, 10:38
Re: Textdraw clickable problem - by Face9000 - 27.01.2014, 10:41
Re: Textdraw clickable problem - by Sawalha - 27.01.2014, 10:43
Re: Textdraw clickable problem - by Face9000 - 27.01.2014, 10:59
Re: Textdraw clickable problem - by $Marco$ - 27.01.2014, 11:43
Re: Textdraw clickable problem - by Face9000 - 29.01.2014, 10:51

Forum Jump:


Users browsing this thread: 3 Guest(s)