Emilio_M Posted March 30, 2015 Posted March 30, 2015 Hi guys. Today i want to make a progress bar in circle. I try somethings with this : viewtopic.php?f=108&t=33342 I want to make a circle with life and armor ( or other else ranging from 0 to 100 ) like : 0 to 180° = life - who start at 0° ( counterclockwise of a watch ) 0 to 180° = armor - who start at 0° ( clockwise ) But, what are calculation and image who i whould take to make it ? I thinks it's a big question. Thanks all !
Emilio_M Posted March 30, 2015 Author Posted March 30, 2015 dxDrawCircle With that you cant draw a part of the circle.
#RooTs Posted March 30, 2015 Posted March 30, 2015 example look, sorry more I tried to help https://wiki.multitheftauto.com/wiki/Dx ... dRectangle https://wiki.multitheftauto.com/wiki/DxDrawLine
Emilio_M Posted March 30, 2015 Author Posted March 30, 2015 Not a rectangle i want to make a circle progress bar
-.Paradox.- Posted March 30, 2015 Posted March 30, 2015 Use dxDrawCircle and mess with radius and other parameters If you're looking for a cheap paid scripter, don't hesitate to contact me. Great minds discuss ideas, Average minds discuss events and small minds discuss people.
3B00DG4MER Posted March 31, 2015 Posted March 31, 2015 https://wiki.multitheftauto.com/wiki/DxDrawCircle SAF/SAO - 30% Skype: Themerzoug2020 in-game name:3B00DG4MER
Emilio_M Posted March 31, 2015 Author Posted March 31, 2015 I cant. When the progress bar approch 0, like this : http://i.gyazo.com/3eb6ae53734f8d686cae82c0aa46adc6.png it's at 1/100.
3B00DG4MER Posted March 31, 2015 Posted March 31, 2015 dxDrawCircle( 200, 200, 50, 5, 1, 0, 0,360) SAF/SAO - 30% Skype: Themerzoug2020 in-game name:3B00DG4MER
Emilio_M Posted March 31, 2015 Author Posted March 31, 2015 I do That : local hpMin = 176 local hpMax = 135 local hpRate = hpMin-hpMax local hp = hpMin-((getElementHealth(getLocalPlayer())*hpRate)/100) dxDrawCircle( 220,796,110, 15,0.01,hp,hpMin,tocolor(255,0,0,255))
#RooTs Posted March 31, 2015 Posted March 31, 2015 I do That : local hpMin = 176 local hpMax = 135 local hpRate = hpMin-hpMax local hp = hpMin-((getElementHealth(getLocalPlayer())*hpRate)/100) dxDrawCircle( 220,796,110, 15,0.01,hp,hpMin,tocolor(255,0,0,255)) gave right?
Emilio_M Posted March 31, 2015 Author Posted March 31, 2015 Yeah, progress bar is good at 100/100 to 20/100 but under 20/100 the bar stay here http://i.gyazo.com/3eb6ae53734f8d686cae82c0aa46adc6.png
#RooTs Posted March 31, 2015 Posted March 31, 2015 Yeah, progress bar is good at 100/100 to 20/100 but under 20/100 the bar stay here http://i.gyazo.com/3eb6ae53734f8d686cae82c0aa46adc6.png show me, more images
Emilio_M Posted March 31, 2015 Author Posted March 31, 2015 at 100 HP : http://i.gyazo.com/959609acb2671f7afad0f40f7b6bcf34.png at 50HP : http://i.gyazo.com/cf85011c834f03bed04252f5aa7e53ac.png at 1HP : http://i.gyazo.com/55a4ea3fbaedd4be170b3412289d175a.png
#RooTs Posted March 31, 2015 Posted March 31, 2015 at 100 HP : http://i.gyazo.com/959609acb2671f7afad0f40f7b6bcf34.pngat 50HP : http://i.gyazo.com/cf85011c834f03bed04252f5aa7e53ac.png at 1HP : http://i.gyazo.com/55a4ea3fbaedd4be170b3412289d175a.png Look, nice very, congratulations
Emilio_M Posted March 31, 2015 Author Posted March 31, 2015 Thanks but at 1HP the progress bar isn't correct. Look.
#RooTs Posted March 31, 2015 Posted March 31, 2015 Thanks but at 1HP the progress bar isn't correct. Look. any errors in debug? try this local hp = hpMin-getElementHealth(getLocalPlayer())*hpRate
Emilio_M Posted March 31, 2015 Author Posted March 31, 2015 Thanks but at 1HP the progress bar isn't correct. Look. try this local hp = hpMin-getElementHealth(getLocalPlayer())*hpRate Wrong No errors. i already try this : dxDrawCircle( 220,796,110, 15,0.01,hp,hpMin,tocolor(255,0,0,255)) But no change.
#RooTs Posted March 31, 2015 Posted March 31, 2015 try this, value 15 for 1 -- 220,796,110, 15, 0.01 dxDrawCircle( 220,796,110, 1,0.01,hp,hpMin,tocolor(255,0,0,255))
#RooTs Posted March 31, 2015 Posted March 31, 2015 sorry my friend, more I'm not able to test here, I am without desktop
Emilio_M Posted March 31, 2015 Author Posted March 31, 2015 I dont understand what do you want to do.
Emilio_M Posted March 31, 2015 Author Posted March 31, 2015 With function draw circle, there is a loss of FPS ( 3 to 5 ) it's not possible to use this...
#RooTs Posted March 31, 2015 Posted March 31, 2015 I dont understand what do you want to do. I am unable to test. only this
Emilio_M Posted March 31, 2015 Author Posted March 31, 2015 try this, value 15 for 1 -- 220,796,110, 15, 0.01 dxDrawCircle( 220,796,110, 1,0.01,hp,hpMin,tocolor(255,0,0,255)) It reduce the width of the circle.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now