Textdraw can not be selected
#1

Hello, i was trying to create a selecteable textdraw, when a problem occured: i can not select it. Code for creating it:
pawn Код:
VehArrows[0] = TextDrawCreate(298.000000, 240.000000, "<");
    TextDrawBackgroundColor(VehArrows[0], 255);
    TextDrawFont(VehArrows[0], 1);
    TextDrawLetterSize(VehArrows[0], 0.500000, 1.000000);
    TextDrawColor(VehArrows[0], -1);
    TextDrawSetOutline(VehArrows[0], 0);
    TextDrawSetProportional(VehArrows[0], 1);
    TextDrawSetShadow(VehArrows[0], 1);
    TextDrawUseBox(VehArrows[0], 1);
    TextDrawBoxColor(VehArrows[0], 255);
    TextDrawTextSize(VehArrows[0], 321.0, 10.0);
    TextDrawSetSelectable(VehArrows[0],1);

    VehArrows[1] = TextDrawCreate(322.000000, 240.000000, ">");
    TextDrawBackgroundColor(VehArrows[1], 255);
    TextDrawFont(VehArrows[1], 1);
    TextDrawLetterSize(VehArrows[1], 0.500000, 1.000000);
    TextDrawColor(VehArrows[1], -1);
    TextDrawSetOutline(VehArrows[1], 0);
    TextDrawSetProportional(VehArrows[1], 1);
    TextDrawSetShadow(VehArrows[1], 1);
    TextDrawUseBox(VehArrows[1], 1);
    TextDrawBoxColor(VehArrows[1], 255);
    TextDrawTextSize(VehArrows[1], 338.0, 10.0);
    TextDrawSetSelectable(VehArrows[1],1);
And the code for it to appear..(it's a command):
pawn Код:
SelectTextDraw(playerid,0xFFFFFFFF);
    TextDrawShowForPlayer(playerid,VehArrows[0]);
    TextDrawShowForPlayer(playerid,VehArrows[1]);
    PlayerTextDrawShow(playerid,VehInfo[playerid]);

I will be happy to hear any thoughts on it
Reply
#2

Have you tried calling TextDrawShowForPlayer before SelectTextDraw. maybe that will fix it.

What colour is the font normally?
Reply
#3

Thanks, but it didn't help.

It's white
Reply
#4

Bump


EDIT: i removed the TextDrawColor function. Now when I hover over the textdraw with my mouse it changes color. But when i press - nothing happens.

EDIT2:I added prints on OnPlayerClickTextDraw callback, they were not printed.

EDIT3: The callback just doesn't get called. I pressed escape, and it didn't even print anything out then...
My code:
pawn Код:
printf("TExtdraw is cliked.");
   
    CancelSelectTextDraw(playerid);
    return 0;
Reply
#5

bump
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)