OnPlayerClickTextDraw ...
#1

I have a textdraw selectable..i click on textdraw and.. nothing happens

pawn Код:
TextDraw = TextDrawCreate(10.000000, 141.000000, "Press Here!");
    TextDrawTextSize(TextDraw,60.000000, 20.000000);
    TextDrawAlignment(TextDraw,0);
    TextDrawBackgroundColor(TextDraw,0x000000ff);
    TextDrawFont(TextDraw,1);
    TextDrawLetterSize(TextDraw,0.250000, 1.000000);
    TextDrawColor(TextDraw,0xffffffff);
    TextDrawSetProportional(TextDraw,1);
    TextDrawSetShadow(TextDraw,1);
    TextDrawSetSelectable(TextDraw, 1);

CMD:
if(strcmp(cmdtext, "/test", true) == 0)
{
    TextDrawShowForPlayer(playerid,TextDraw);
    SelectTextDraw(playerid, 0xFF4040AA);
    return 1;
}

public OnPlayerClickTextDraw(playerid, Text:clickedid)
{
    if(clickedid == TextDraw)
    {
         SetPlayerPos(playerid, 1529.6,-1691.2,13.3);
         SendClientMessage(playerid, 0xFFFFFFAA, "You clicked on a textdraw.");
         CancelSelectTextDraw(playerid);
    }
    return 1;
}
Reply
#2

Does the Textcolor change when you hover it?
Please note that the clickable area moves if you play in windowmode.
Reply
#3

Yes,color is changed.
Reply
#4

Use return 0; in GM, at the end of OnPlayerClickTextDraw callback, same on FS.
Reply
#5

Done..thanks solv
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)