Code: Select all
<tr>
<td width="14%"><font face="Arial">Hitpoints:
<table border="1" width="100" height="10">
<tr>
<td width="100%"><img border="0" src="test1.png" width="<?php echo floor($playerinfo3['hpoints'] / $playerinfo3['maxhp']*100) ; ?>" height="10"></td>
</tr>
you guessed it .. i coded a health bar...
ok so test.png is a 1 pixel wide picture of just the color red .. and the bar is 100 pix wide .. so when you get your percentage that your health is (current health - max health * 100) then that number is how wide the 1pix picture is inside ya graph .. and no crap .. i worked this out myself .. thanks halls .. i knows its messy and sstuff, but u get it...