How to create the same textdraw many times in a row? - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: How to create the same textdraw many times in a row? (
/showthread.php?tid=596485)
How to create the same textdraw many times in a row? -
Cypress - 18.12.2015
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.
Re: How to create the same textdraw many times in a row? -
ikey07 - 18.12.2015
What result you want to get on the screen?
[ ] [ ] [ ] [ ] [ ] [ ] [ ] [ ] [ ] [ ]
or
[ ]
[ ]
[ ]
[ ]
[ ]
[ ]
?
Re: How to create the same textdraw many times in a row? -
Cypress - 18.12.2015
Quote:
Originally Posted by ikey07
What result you want to get on the screen?
[ ] [ ] [ ] [ ] [ ] [ ] [ ] [ ] [ ] [ ]
or
[ ]
[ ]
[ ]
[ ]
[ ]
[ ]
?
|
The first one.
Re: How to create the same textdraw many times in a row? -
ikey07 - 18.12.2015
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.
Re: How to create the same textdraw many times in a row? -
Cypress - 18.12.2015
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!