How to create the same textdraw many times in a row?
#1

Just a quick question. I'm trying to make 10 boxes in a row with a loop, although no success.

pawn Код:
for ( new row = 0; row < 10; row++ )
    {
        reputation_bar[ row ] = TextDrawCreate( 93.250000 + ( row * 25 ), 130.416641+ (row*10), "usebox" );
        TextDrawLetterSize(reputation_bar[ row ], 0.000000, -0.122222);
        TextDrawTextSize(reputation_bar[ row ], 67.375000, 0.000000);
        TextDrawAlignment(reputation_bar[ row ], 1);
        TextDrawColor(reputation_bar[ row ], 0);
        TextDrawUseBox(reputation_bar[ row ], true);
        TextDrawBoxColor(reputation_bar[ row ], 1661529);
        TextDrawSetShadow(reputation_bar[ row ], 0);
        TextDrawSetOutline(reputation_bar[ row ], 0);
        TextDrawFont(reputation_bar[ row ], 0);
    }
Unfortunately here is what I get



Edit: I have adjusted the Y to see whats going on because they were covering each other and it looked like a continues textdraw.
Reply
#2

What result you want to get on the screen?


[ ] [ ] [ ] [ ] [ ] [ ] [ ] [ ] [ ] [ ]


or
[ ]
[ ]
[ ]
[ ]
[ ]
[ ]


?
Reply
#3

Quote:
Originally Posted by ikey07
Посмотреть сообщение
What result you want to get on the screen?


[ ] [ ] [ ] [ ] [ ] [ ] [ ] [ ] [ ] [ ]


or
[ ]
[ ]
[ ]
[ ]
[ ]
[ ]


?
The first one.
Reply
#4

I have forgot which one, but adjust one of these

TextDrawLetterSize(reputation_bar[ row ], 0.000000, -0.122222); //If its negative it will go to the left side
TextDrawAlignment(reputation_bar[ row ], 1); // try to align to center


It looks like your TDs goes from right to left, and the "end point" actually is the start.
Reply
#5

Quote:
Originally Posted by ikey07
Посмотреть сообщение
I have forgot which one, but adjust one of these

TextDrawLetterSize(reputation_bar[ row ], 0.000000, -0.122222); //If its negative it will go to the left side
TextDrawAlignment(reputation_bar[ row ], 1); // try to align to center


It looks like your TDs goes from right to left, and the "end point" actually is the start.
It's been the alignment. Thanks for the help!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)