OnPlayerClickTextDraw
#1

OnGameModeInit
Код:
    Textdraw0 = TextDrawCreate(560.000000, 130.000000, ".");
    TextDrawBackgroundColor(Textdraw0, 255);
    TextDrawFont(Textdraw0, 1);
    TextDrawLetterSize(Textdraw0, 1.800000, 23.000000);
    TextDrawColor(Textdraw0, -1);
    TextDrawSetOutline(Textdraw0, 0);
    TextDrawSetProportional(Textdraw0, 1);
    TextDrawSetShadow(Textdraw0, 1);
    TextDrawUseBox(Textdraw0, 1);
    TextDrawBoxColor(Textdraw0, 255);
    TextDrawTextSize(Textdraw0, 440.000000, -10.000000);
    TextDrawSetSelectable(Textdraw0, 1);
OnPlayerConnect
Код:
TextDrawShowForPlayer(playerid, Textdraw0);
Код:
public OnPlayerClickTextDraw(playerid, Text:clickedid)
{
    if(clickedid == Textdraw0)
    {
         SendClientMessage(playerid, 0xFFFFFFAA, "You clicked on a textdraw.");
        CancelSelectTextDraw(playerid);
    }
    return 1;
}
Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if(newkeys == KEY_SUBMISSION)
    {
        SelectTextDraw(playerid, 0xFF4040AA);
    }
    return 1;
}
It show me the TextDraw but i cant to click him...
Reply
#2

Again, if the textdraw is just a box(empty), it can't be clicked, you should try to add a text above the box.
Btw make sure the Key is valid.
Reply
#3

Have the box, and near the box have a text - "."
Reply
#4

up!!!
Reply
#5

That won't be enough, just make an other textdraw above the Box which will be clickable.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)