function get_bar_top_offset($itm, $idx) { global $bar_steps; $h = $itm->coordinates->height - $itm->padding * 2; $mh = $h / $bar_steps; $offs = $itm->padding; if ($itm->barDirection == '0' || $itm->barDirection == '1') { $height = $itm->coordinates->height - $offset * 2; $barHeight = get_bar_height($itm, $idx); $offs = round($offs - ($barHeight - $height) / 2, 2); } else { if ($itm->barDirection == '3') { $offs = $h - round($mh * $idx) + $itm->padding; } } return $offs; }
name "bar_200_<?php echo $i; ?> " visible 1 rect <?php echo get_bar_left_offset($menuItem, $i); ?> <?php echo $top; ?> <?php echo round($minWidth * $i); ?> <?php echo get_bar_height($menuItem, $i); ?> style 1 background "ui/assets/score/statsfillm" forecolor 0 0 0 0 ownerdraw CG_PLAYER_ARMOR_VALUE addColorRange <?php echo 100 + $i * 2; ?> <?php echo 101 + $i * 2; ?> <?php echo decode_color($menuItem->colorRanges[2]->color); ?>