OnPlayerClickPlayerTextDraw Not Calling
#1

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.
Reply
#2

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

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;
Reply
#4

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

Up! I have the same problem.
Reply
#6

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)