Textdraws - selecteable bug
#1

Hello guys,

I've got a big problem with some textdraws..
Code..
PHP код:
enum TD_MainMenuValues
{
    
Float:td_pos_x,
    
Float:td_pos_y,
    
td_text[50],
    
Float:td_ls_x,
    
Float:td_ls_y,
    
Float:td_ts_x,
    
Float:td_ts_y,
    
td_al,
    
td_col,
    
bool:td_box,
    
td_box_cl,
    
td_ss,
    
td_so,
    
td_bcol,
    
td_font,
    
td_sp,
    
bool:td_ssel
}
new 
Text:TD[MAX_TEXTDRAWS][MAX_PLAYERS_EX];
new 
TD_MM[MAX_TEXTDRAWS][TD_MainMenuValues] =
{
    { 
1001.529296, -77.250000  "usebox" 0.00000078.572769 , -117.2941280.000000   0  true  1840000false },
    { 
202.470596128.083328"usebox"  0.00000023.28834540.352924, -50.000000  true , -248  00000false },
    { 
43.294155344.749969"Players On-line:" 0.2405880.637499 150.000000   5.000000  , -false 0  015111false },
    { 
46.647068130.500045"You have no account yet." 0.2499990.783333250.000000   15.000000  , -16777066 false 0  015111false },
    { 
61.176490153.416687"Create new account"  0.3681171.144999195.000000   10.000000  , -196 false 0  015111true },
    { 
47.705841168.333389"Account information"  0.1662340.684165110.000000   7.000000  , -196 false 0  015111true },
    { 
153.529327168.833374"Delete account"  0.1662340.684165130.000000   9.000000  , -16777132 false 0  015111true },
    { 
96.058868192.333267"Options"  0.3681171.14499965.000000 10.000000  , -196 false 0  015111true },
    { 
47.705841208.333389"Account settings"  0.1662340.68416595.000000   7.000000  , -196 false 0  015111true },
    { 
115.999969208.166748"Chat & Teamspeak settings"  0.1662340.684165195.000000   7.000000  , -196 false 0  015111true },
    { 
99.411811231.249938"About"  0.3681171.14499950.000000   20.000000  , -196 false 0  015111true },
    { 
48.647098275.416717"Connect to Teamspeak 3 Server"  0.2575290.882499192.000000   7.000000  , -196 false 0  015111true },
    { 
48.705921288.083404"Set me AFK"  0.2575290.882499103.000000   7.000000  , -196 false 0  015111true },
    { 
48.764743300.750122"View best gangs"  0.2575290.882499125.000000   7.000000  , -196 false 0  015111true },
    { 
130.058883323.249969"Disconnect"  0.3681171.14499985.000000   15.000000  , -16777132 false 0  015111true }
};
public 
OnPlayerConnect(playerid)
{
    for(new 
0;i<MAX_TEXTDRAWS;i++)
    {
        
TD[i][playerid] = TextDrawCreate(TD_MM[i][td_pos_x], TD_MM[i][td_pos_y], TD_MM[i][td_text]);
        
TextDrawLetterSize(TD[i][playerid], TD_MM[i][td_ls_x], TD_MM[i][td_ls_y]);
        
TextDrawTextSize(TD[i][playerid], TD_MM[i][td_ts_x], TD_MM[i][td_ts_y]);
        
TextDrawAlignment(TD[i][playerid], TD_MM[i][td_al]);
        
TextDrawColor(TD[i][playerid], TD_MM[i][td_col]);
        
TextDrawUseBox(TD[i][playerid], TD_MM[i][td_box]);
        
TextDrawBoxColor(TD[i][playerid], TD_MM[i][td_box_cl]);
        
TextDrawSetShadow(TD[i][playerid], TD_MM[i][td_ss]);
        
TextDrawSetOutline(TD[i][playerid], TD_MM[i][td_so]);
        
TextDrawBackgroundColor(TD[i][playerid], TD_MM[i][td_bcol]);
        
TextDrawFont(TD[i][playerid], TD_MM[i][td_font]);
        
TextDrawSetProportional(TD[i][playerid], TD_MM[i][td_sp]);
        
TextDrawSetSelectable(TD[i][playerid], TD_MM[i][td_ssel]);
    }
    return 
1;

You see creating Textdraws. There is no problem. They'll create and show. But when I want select them ("SelectTextDraw" (or something like that)), it's not doing anything on some TDs:

Delete Account
Options
About
Disconnect

I have no idea why...
Pawno is kidding me, maybe.

Thank you...
Reply
#2

you forgot
PHP код:
    SelectTextDraw(TD[i][playerid],-1); // -1 > white 
Reply
#3

No, it's in another command. Read, what I wrote..

it's not doing anything on some TDs:

I have it, but only 4 tds not working...
Reply
#4

Okay, Im back.
It's working, I changed TextSize X with helper "I" - it's textdraw, you'll just move him on position, where you want end of selectable. He helped. Thank you.

(If you dont understand, sorry, my english isnt best)
Reply
#5

Another problem you are using the wrong type of textdraws use player textdraws.
Reply
#6

Quote:
Originally Posted by Pottus
Посмотреть сообщение
Another problem you are using the wrong type of textdraws use player textdraws.
Well this is arguably fine as long as the OP doesn't have more than 136 players. But as Pottus said, I'd convert these to Player TextDraws.
Reply
#7

Why is that problem ?

(Done)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)