SA-MP Forums Archive
Problem OnPlayerClickPlayerTextDraw. - 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: Problem OnPlayerClickPlayerTextDraw. (/showthread.php?tid=490089)



Problem OnPlayerClickPlayerTextDraw. - TheSy - 25.01.2014

I created several textdraws and I put in two to three PlayerTextDrawSetPreviewModel.

So I then used OnPlayerClickPlayerTextDraw, and in a ShowPlayerDialog.

The trouble is that when I click once to place the ShowPlayerDialog and I cancel, I can click anywhere on the screen (Not the exact spot so) it will the ShowPlayerDialog...

pawn Код:
public OnPlayerClickPlayerTextDraw(playerid, PlayerText:playertextid)
{
    if(_:playertextid != INVALID_TEXT_DRAW)
    {
        if(playertextid == Textdraw0[playerid])
        {
            CancelSelectTextDraw(playerid);
            PlayerTextDrawHide(playerid, Textdraw0[playerid]);
            PlayerTextDrawHide(playerid, Textdraw1[playerid]);
            PlayerTextDrawHide(playerid, Textdraw2[playerid]);
        }
        if(playertextid == Textdraw1[playerid])
        {
            return ShowPlayerDialog(playerid, 0, DIALOG_STYLE_INPUT, "Title.", "Text", "Ok", "Quit");
        }
    }
    return 1;
}
Help me please?


Re: Problem OnPlayerClickPlayerTextDraw. - Pottus - 25.01.2014

You need to use OnPlayerClickTextDraw() to detect this if(_layertextid != INVALID_TEXT_DRAW)


Re : Problem OnPlayerClickPlayerTextDraw. - TheSy - 25.01.2014

I use PlayerTextDraw...


Re : Problem OnPlayerClickPlayerTextDraw. - TheSy - 25.01.2014

upp..


Re: Problem OnPlayerClickPlayerTextDraw. - TheSy - 26.01.2014

.................