Emilio_M Posted March 30, 2015 Share 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 ! Link to comment
Emilio_M Posted March 30, 2015 Author Share Posted March 30, 2015 dxDrawCircle With that you cant draw a part of the circle. Link to comment
#RooTs Posted March 30, 2015 Share Posted March 30, 2015 in this time not. I am in dispositive mobile Link to comment
#RooTs Posted March 30, 2015 Share 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 Link to comment
Emilio_M Posted March 30, 2015 Author Share Posted March 30, 2015 Not a rectangle i want to make a circle progress bar Link to comment
-.Paradox.- Posted March 30, 2015 Share Posted March 30, 2015 Use dxDrawCircle and mess with radius and other parameters Link to comment
3B00DG4MER Posted March 31, 2015 Share Posted March 31, 2015 https://wiki.multitheftauto.com/wiki/DxDrawCircle Link to comment
Emilio_M Posted March 31, 2015 Author Share 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. Link to comment
3B00DG4MER Posted March 31, 2015 Share Posted March 31, 2015 dxDrawCircle( 200, 200, 50, 5, 1, 0, 0,360) Link to comment
Emilio_M Posted March 31, 2015 Author Share 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)) Link to comment
#RooTs Posted March 31, 2015 Share 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? Link to comment
Emilio_M Posted March 31, 2015 Author Share 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 Link to comment
#RooTs Posted March 31, 2015 Share 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 Link to comment
Emilio_M Posted March 31, 2015 Author Share 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 Link to comment
#RooTs Posted March 31, 2015 Share 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 Link to comment
Emilio_M Posted March 31, 2015 Author Share Posted March 31, 2015 Thanks but at 1HP the progress bar isn't correct. Look. Link to comment
#RooTs Posted March 31, 2015 Share 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 Link to comment
Emilio_M Posted March 31, 2015 Author Share 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. Link to comment
#RooTs Posted March 31, 2015 Share 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)) Link to comment
#RooTs Posted March 31, 2015 Share Posted March 31, 2015 sorry my friend, more I'm not able to test here, I am without desktop Link to comment
Emilio_M Posted March 31, 2015 Author Share Posted March 31, 2015 I dont understand what do you want to do. Link to comment
Emilio_M Posted March 31, 2015 Author Share Posted March 31, 2015 With function draw circle, there is a loss of FPS ( 3 to 5 ) it's not possible to use this... Link to comment
#RooTs Posted March 31, 2015 Share Posted March 31, 2015 I dont understand what do you want to do. I am unable to test. only this Link to comment
Emilio_M Posted March 31, 2015 Author Share 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. Link to comment
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