SA-MP Forums Archive
OnPlayerClickTextDraw not called - 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: OnPlayerClickTextDraw not called (/showthread.php?tid=458226)



OnPlayerClickTextDraw not called - dusk - 15.08.2013

Hello, for some reason it is not called in my script, my textdraw creation code:
pawn Код:
VehArrows[0] = TextDrawCreate(298.000000, 240.000000, "LD_BEAT:left");
    TextDrawFont(VehArrows[0], 4);
    TextDrawTextSize(VehArrows[0], 10.0, 10.0);
    TextDrawSetSelectable(VehArrows[0],1);

    VehArrows[1] = TextDrawCreate(322.000000, 240.000000, "LD_BEAT:right");
    TextDrawFont(VehArrows[1], 4);
    TextDrawTextSize(VehArrows[1], 10.0, 10.0);
    TextDrawSetSelectable(VehArrows[1],1);
And the code to enable the mouse:
pawn Код:
SelectTextDraw(playerid,0xFF000077);
    TextDrawShowForPlayer(playerid,VehArrows[0]);
    TextDrawShowForPlayer(playerid,VehArrows[1]);
My callback looks like this:
pawn Код:
public OnPlayerClickTextDraw(playerid,Text:clickedid)
{
    SendClientMessage(playerid,-1,"VEIKIA. Callback iskviestas");
    CancelSelectTextDraw(playerid);
    return 1;
}
The message doesn't get sent.

Any ideas? Any guesses? Anything? I want to hear it....I'm desperate...


Re: OnPlayerClickTextDraw not called - gtakillerIV - 15.08.2013

Got any FS that uses the same callback and is returning 1? Returning 1 means that it won't get called on any other FS/GM.


Re: OnPlayerClickTextDraw not called - dusk - 15.08.2013

I love you. I had some FS that i didn't even know i had and i don't even know what it does :/
Anyway, thankyou!

I welcome you to look at my other problem: http://forum.sa-mp.com/showthread.ph...51#post2659651