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



OnPlayerClickPlayerTextDraw Not Calling - maximthepain - 28.04.2017

Hello, I'm trying to click a playertextdraw that ive created but it won't call OnPlayerClickPlayerTextDraw function. (I made print test)
Pretty sure PlayerTextDrawTextSize is causing this. But i have no clue to what I must change this to make it the same as it looks right now.

PlayerTextDrawTextSize(playerid, TEST[0], 107.000000, 28.000000);
This might cause the issue? Wiki doesn't say anything about limited values.


Re: OnPlayerClickPlayerTextDraw Not Calling - AndreiWow - 29.04.2017

Set it to 10 and 10 not sure, also is the textdraw selectable?


Re: OnPlayerClickPlayerTextDraw Not Calling - maximthepain - 29.04.2017

Quote:
Originally Posted by AndreiWow
Посмотреть сообщение
Set it to 10 and 10 not sure, also is the textdraw selectable?
Yes ofcurse its selectable. heres the full textdraw:
Theres different TEST[16] like those, this is just one of them.
pawn Код:
TEST[5] = CreatePlayerTextDraw(playerid, 261.000000, 171.000000, "ld_otb2:butnc");
    PlayerTextDrawTextSize(playerid, TEST[5], 107.000000, 28.000000);
    PlayerTextDrawBackgroundColor(playerid, MDC[5], 0);
    PlayerTextDrawFont(playerid, TEST[5], 4);
    PlayerTextDrawLetterSize(playerid, MDC[5], 0.810000, 1.000000);
    PlayerTextDrawColor(playerid, TEST[5], -1);
    PlayerTextDrawSetOutline(playerid, TEST[5], 0);
    PlayerTextDrawSetProportional(playerid, TEST[5], 1);
    PlayerTextDrawSetShadow(playerid, TEST[5], 1);
    PlayerTextDrawUseBox(playerid, TEST[5], 1);
    PlayerTextDrawBoxColor(playerid, TEST[5], 255);
    PlayerTextDrawSetSelectable(playerid, TEST[5], true);
Ive changed PlayerTextDrawTextSize to 10.0,10.0, What it does is that the size of the clicking area is smaller (which is bad for me) and its still not doing a thing when I'm clicking it.

Heres OnPlayerClickPlayerTextDraw:
pawn Код:
public OnPlayerClickPlayerTextDraw(playerid, PlayerText:playertextid)
{
    if(_:playertextid == INVALID_TEXT_DRAW)
        return CallLocalFunction("OnPlayerClickPlayerTextDraw", "ii", playerid, INVALID_TEXT_DRAW);
       
    if(playertextid == TEST[5])
    {
        HideMDCMenu(playerid);
        ShowPlayerDialog(playerid, DIALOG_MDC_PlayerI, DIALOG_STYLE_INPUT, "TEST|| Person Lookup", "=====================================================\nTEST\n\nINPUT THE PERSON (ID) TO SEARCH\n\n=====================================================\n", "SEARCH", "");
    }
}
return 1;



Re: OnPlayerClickPlayerTextDraw Not Calling - maximthepain - 29.04.2017

BUMP,
Found out that all the clickable textdraws suddenly doesn't work!
what can cause OnPlayerClickTextDraw to not work?


Re: OnPlayerClickPlayerTextDraw Not Calling - Captive - 19.08.2017

Up! I have the same problem.


Re: OnPlayerClickPlayerTextDraw Not Calling - TheCman - 19.08.2017

Both of you please check that you don't have other filterscripts or even your gamemode returning 1 in OnPlayerClickPlayerTextDraw. That would prevent the callback from being properly propagated to your current script.