Вход Регистрация
Файл: bloodlands.pw/include/user_hp.php
Строк: 18
<?
$max 
= abs(intval($_GET['max']));
$min = abs(intval($_GET['min']));
$proc = round(($min/$max)*100,2);
if(
$proc > 100) $proc = 100; 
$health = round(150/($max/$min));


$img="../img/hp.gif";
$pic = ImageCreateFromgif($img);
header('Content-Type: image/gif');
$black = imagecolorallocate($pic, 999, 999, 999);
$s = abs(intval($_GET['style']));
if(
$s == 1) $white = imagecolorallocate($pic, 177, 182, 157);
else 
$white = imagecolorallocate($pic, 50, 50, 49);
$grey = imagecolorallocate($pic, 0, 0, 0);
imagefilledpolygon($pic, array(255,0,0,24, $health,24, $health,0), 4, $black);
imagestring($pic, 1, 3, 2, 'HP: '.$min.'/'.$max.'', $grey);
imagepolygon($pic, array(0,0, 0,11, 129,11, 129,0), 4, $white);
ob_end_clean();
imagegif($pic);

?>
Онлайн: 0
Реклама