clickable TDs
#1

I've made a script with clickable TDs, here's some code:

pawn Код:
new Text:teamTextdraw[11];

public OnGameModeInit() {
    // 10 textdraws created here, didnt paste the code here, too much code
    for(new i=0; i<sizeof(teamTextdraw); ++i) {
        if(i == 2 || i == 3) TextDrawSetSelectable(teamTextdraw[i], false); // td2 and td3 must not be selectable
        else TextDrawSetSelectable(teamTextdraw[i], true);
    }
    return 1;
}
And then I want to show the textdraws and give the select cursor to the player:
pawn Код:
for(new i=0; i<sizeof(teamTextdraw); ++i) {
    TextDrawShowForPlayer(playerid, teamTextdraw[i]);
}
SelectTextDraw(playerid, RED);
When I select a textdraw, and then go to another textdraw, the one I selected before it stays selected.
Why?





FIXED thanks to iPLEOMAX
Reply
#2

Almost 24 hours passed so...

Here's a video of my issue:
[ame]http://www.youtube.com/watch?v=uCAHTw1Ebf8[/ame]

I want it to select only ONE at a time.
Reply
#3

This happens to me aswell.
Im not quite sure, but maybe the Y size of the textdraw is too big so that its on top of other textdraws so if you choose another one it still thinks you are hovering the previous one also?
Reply
#4

Quote:
Originally Posted by Universal
Посмотреть сообщение
This happens to me aswell.
Im not quite sure, but maybe the Y size of the textdraw is too big so that its on top of other textdraws so if you choose another one it still thinks you are hovering the previous one also?
I don't really think so. The top textdraw isn't that huge to go all the way to the bottom one.
Reply
#5

In the textdraw editor, apply UseBox first and color it so you can see it.
Then resize the box according to your wish (clickable area).
*Center alignment is always good.

Then export it with Disable Box & it's color.

You should get a nice clickable area for each item.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)