View Single Post
  #4  
Old 09-08-2011, 04:05 AM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
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.maxhp1);
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.
__________________
Quote:
Reply With Quote