Textdraw box
#1

hey .
im trying to create a textdraw box as a progress bar that shows the player skill by looking at the score...
i'm done but the problem is :
Are there any way to add to the "y" scale for every range of scores?
for example , when the player's score is under 100 the scale of bar be : ▬▬
and when it gets to 100 , the scale of bar be : ▬▬▬▬
Reply
#2

Isn't that the x-axis?

https://sampwiki.blast.hk/wiki/TextDrawTextSize
Reply
#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
#4

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

thanks so much gonna try it
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)