Sorry but i don't really know.....
maybe try to inverse them??
PHP Code:
if(HEALTH_BOSS < (cso_boss_health - 1000.0))
{
set_pev(y_hpbar, pev_frame, 0.0 + ((((cso_boss_health - 1000.0) - 1 ) * 100) / HEALTH_BOSS))
} else {
set_pev(y_hpbar, pev_frame, 100.0)
}