View file wofh/hp.php

File size: 590B
<?
$max = $player['life_max'];
$now = $player['life']; 
$health = 100 / ($max / $now); 

header('Content-Type: image/gif');
$img = imagecreatetruecolor(100, 10);

imagecolorallocate($img, 0, 0, 0);
$red = imagecolorallocate($img, 255, 0, 0);
$white = imagecolorallocate($img, 255, 255, 255);
imagefilledpolygon($img, array(0,0, 0,10, $health,10, $health,0), 4, $red);

$fon = imagecolorallocate($img, 255, 255, 255);
imagestring($img, 1, 3, 1, "HP:  $now/$max", $white);
imagepolygon($img, array(0,0, 0,9, 99,9, 99,0), 4, $fon);

imagegif($img);
$page_main.="$img";
?>