Issue with selectable textdraw?
#1

I'm unsure as to why this happens.

When I click the first textdraw it works, but when I select the ones along it seems to highlight them all and work incorrectly, like this.

I've tried changing the TextSize etc as I know it's the area.

PICTURES:
https://imgur.com/a/vb7Ry
Reply
#2

may you post your create textdraw codes so we can take a deeper look into the issue?
Reply
#3

I bet you've used TDE. Happened to me too, I've just used TextSize and it worked, just check if the value you've insered into TextSize are correct
Reply
#4

I did indeed.

What do you mean?
Reply
#5

TDE doesn't give you the TextDrawTextSize lines when you export the project. Add the TextSize for every textdraw and test the values. In my case I created some textdraws used like buttons. I had to use
Код HTML:
TextDrawTextSize(Server[MainTD][2], 90.000000, 90.000000);
before that every textdraw got highlighted
Reply
#6

All of the selectable textdraws or all of them entirely? Thanks for the info.
Reply
#7

All of the selectable tds
Reply
#8

I've done that and now they aren't clickable at all.
Here's the code for the textdraws.

pawn Код:
QMark[i][0] = TextDrawCreate(214.801742, 194.480072, " ");//?
        TextDrawLetterSize(QMark[i][0], 0.565599, 2.565685);
                TextDrawTextSize(QMark[i][0], 90.000000, 90.000000);
        TextDrawAlignment(QMark[i][0], 1);
        TextDrawColor(QMark[i][0], -1);
        TextDrawSetShadow(QMark[i][0], 0);
        TextDrawSetOutline(QMark[i][0], 0);
        TextDrawBackgroundColor(QMark[i][0], 255);
        TextDrawFont(QMark[i][0], 1);
        TextDrawSetProportional(QMark[i][0], 1);
        TextDrawSetShadow(QMark[i][0], 0);
        TextDrawSetSelectable(QMark[i][0], true);
       
        QMark[i][1] = TextDrawCreate(280.001312, 194.480072, " ");//?
        TextDrawLetterSize(QMark[i][1], 0.565599, 2.565685);
        TextDrawTextSize(QMark[i][1], 90.000000, 90.000000);
        TextDrawAlignment(QMark[i][1], 1);
        TextDrawColor(QMark[i][1], -1);
        TextDrawSetShadow(QMark[i][1], 0);
        TextDrawSetOutline(QMark[i][1], 0);
        TextDrawBackgroundColor(QMark[i][1], 255);
        TextDrawFont(QMark[i][1], 1);
        TextDrawSetProportional(QMark[i][1], 1);
        TextDrawSetShadow(QMark[i][1], 0);
        TextDrawSetSelectable(QMark[i][1], true);
       
        QMark[i][2] = TextDrawCreate(346.800384, 194.480056, " ");//?
        TextDrawLetterSize(QMark[i][2], 0.565599, 2.565685);
        TextDrawTextSize(QMark[i][2], 90.000000, 90.000000);
        TextDrawAlignment(QMark[i][2], 1);
        TextDrawColor(QMark[i][2], -1);
        TextDrawSetShadow(QMark[i][2], 0);
        TextDrawSetOutline(QMark[i][2], 0);
        TextDrawBackgroundColor(QMark[i][2], 255);
        TextDrawFont(QMark[i][2], 1);
        TextDrawSetProportional(QMark[i][2], 1);
        TextDrawSetShadow(QMark[i][2], 0);
        TextDrawSetSelectable(QMark[i][2], true);
       
        QMark[i][3] = TextDrawCreate(411.999938, 193.484497, " "); //"?"
        TextDrawLetterSize(QMark[i][3], 0.565599, 2.565685);
        TextDrawTextSize(QMark[i][3], 90.000000, 90.000000);
        TextDrawAlignment(QMark[i][3], 1);
        TextDrawColor(QMark[i][3], -1);
        TextDrawSetShadow(QMark[i][3], 0);
        TextDrawSetOutline(QMark[i][3], 0);
        TextDrawBackgroundColor(QMark[i][3], 255);
        TextDrawFont(QMark[i][3], 1);
        TextDrawSetProportional(QMark[i][3], 1);
        TextDrawSetShadow(QMark[i][3], 0);
        TextDrawSetSelectable(QMark[i][3], true);
Where I use them and how I do:

pawn Код:
if(AccID[playerid][x] == 0)
{
    TextDrawFont(CharSel[playerid][y], 1); //Setting the font to anything other than 5 makes it not display
    TextDrawSetString(QMark[playerid][x], "?");
    TextDrawShowForPlayer(playerid, QMark[playerid][x]);
    TextDrawSetSelectable(QMark[playerid][x], true);
    TextDrawSetString(CharSel[playerid][n], "Create_Character");
    TextDrawSetString(CharSel[playerid][l], "N/A");
}
else
{
    TextDrawFont(CharSel[playerid][y], 5);
    TextDrawSetPreviewModel(CharSel[playerid][y], AccIDSkin[playerid][x]); //Setting the preview model (skin)
    TextDrawSetPreviewRot(CharSel[playerid][y], 0.000000, 0.000000, 0.000000, 1.000000);
    TextDrawSetString(CharSel[playerid][n], GetSQLName(AccID[playerid][x])); // Set the name under the skin
    format(leve, sizeof(leve), "Level_%d", AccIDLevel[playerid][x]); //Set the level
    TextDrawSetString(CharSel[playerid][l], leve);
    TextDrawSetString(CharSel[playerid][y], " ");
}
Reply
#9

Change the 90.000 value to another value. In my case the textdraw was a square box, in your case if it is a rectangle try for example with 20.0000, 80.0000 values and try until you find the right X Y values.
Reply
#10

It doesn't actually let me click them, that's the issue, surely it would regardless of size?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)