Textdraw box
#3

You need to align the box left, and then use percentages (very easy maths).

If the width is set to 100 then it's fairly obvious - width == the percentage. If the bar is 125 wide, you need to work out what one percent is.

125/100 = 1.25
1.25 for every percent.
If you want it to be half full (50 percent), 50 x 1.25 = 62.5.

Width = full_width / 100 * percentage;


Quote:
Originally Posted by LarzI
Посмотреть сообщение
If a textdraw's alignment is centered the Y axis becomes the X axis.
Reply


Messages In This Thread
Textdraw box - by absolute - 07.03.2013, 21:25
Re: Textdraw box - by LarzI - 07.03.2013, 21:57
Re: Textdraw box - by MP2 - 07.03.2013, 22:08
Re: Textdraw box - by LarzI - 07.03.2013, 22:20
Re: Textdraw box - by absolute - 08.03.2013, 05:04

Forum Jump:


Users browsing this thread: 1 Guest(s)