Question about percentage calculation.
Hello, I want to make a HUD message which looks like that:
>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<< I have 2 variables, but I can't think of how exactly I can do it to show the percent of each variable (depending on the sum of them). I have tried different ways buy I couldn't do it exactly as I want. When they have the same value, then it should be 50%-50% and the HUD should look like the one above. When they are 75%-50% the HUD should look like: >>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<< When they are 100%-0% it should be: >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 99%-1%: >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>< And so on... The HUD must be always 40 characters. The variables are integer numbers. How exactly can I do this? |
Re: Question about percentage calculation.
You can do this:
Code:
Usage: Code:
|
Re: Question about percentage calculation.
Thank you! :)
I also had a problem with the percent calculation, but I solved it... |
| All times are GMT -4. The time now is 00:28. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.