Hello, I'm having some problems with some textdraws. I have 2 boxes, one that moves along the x-axis (showing the progress) and then a somewhat transparent black box behind it. The problem is that when I move the progress bar it starts out the correct height (the same as the black box behind it) but then stretches and loses its height.
It's then this for the rest of the width of the black box until it goes back to the start in which the whole process is repeated:
pawn Код:
new Float:org = 205.0000; //the starting point
hook OnPlayerUpdate(playerid)//planning on putting this in a timer later.
{
org+= 2.14;
TextDrawTextSize(Textdraw1, org, 1.000000);
TextDrawShowForAll(Textdraw1);
if(org >= 443.0000)//the end of the black box
org = 205.0000;
return 1;
}
pawn Код:
Textdraw0 = TextDrawCreate(443.000000, 300.000000, " ");//black box behind
TextDrawBackgroundColor(Textdraw0, 255);
TextDrawFont(Textdraw0, 1);
TextDrawLetterSize(Textdraw0, 0.500000, 1.000000);
TextDrawColor(Textdraw0, -1);
TextDrawSetOutline(Textdraw0, 0);
TextDrawSetProportional(Textdraw0, 1);
TextDrawSetShadow(Textdraw0, 1);
TextDrawUseBox(Textdraw0, 1);
TextDrawBoxColor(Textdraw0, 96);
TextDrawTextSize(Textdraw0, 201.000000, 0.000000);
Textdraw1 = TextDrawCreate(205.000000, 300.000000, " ");//moving textdraw, the progress bar
TextDrawBackgroundColor(Textdraw1, 255);
TextDrawFont(Textdraw1, 1);
TextDrawLetterSize(Textdraw1, 0.500000, 1.000000);
TextDrawColor(Textdraw1, -1);
TextDrawSetOutline(Textdraw1, 0);
TextDrawSetProportional(Textdraw1, 1);
TextDrawSetShadow(Textdraw1, 1);
TextDrawUseBox(Textdraw1, 1);
TextDrawBoxColor(Textdraw1, 897374378);
TextDrawTextSize(Textdraw1, 201.000000, 1.000000);
Textdraw2 = TextDrawCreate(324.000000, 302.000000, "0%");//will indicate percentage job done on x job
TextDrawAlignment(Textdraw2, 2);
TextDrawBackgroundColor(Textdraw2, 255);
TextDrawFont(Textdraw2, 2);
TextDrawLetterSize(Textdraw2, 0.310000, 1.399999);
TextDrawColor(Textdraw2, -1);
TextDrawSetOutline(Textdraw2, 1);
TextDrawSetProportional(Textdraw2, 1);