Quote:
Originally Posted by fowlplay4
If you specify a 0 width in changeimgpart it uses the entire width. So you can easily fix it like this:
PHP Code:
// HP Bar
temp.bar_width = max(clientr.player.stats.curhp*102/clientr.player.stats.maxhp, 1);
changeimgpart(202,18,103,temp.bar_width,12);
max(a, b) - returns the higher number.
So in the case above if your calculated width is lower than 1 it'll pick 1 instead.
|
I never knew about
PHP Code:
max(a, b) - returns the higher number.
But I find that very usefull..
PHP Code:
You must spread some Reputation around before giving it to fowlplay4 again.