Only for zombies and does not count HP multipliar. Thats why i dont even consider using this.
If i use pev_max_health , the code will look like this right? Correct it please , if smth is wrong :
PHP Code:
stock get_user_maxhealth( idUser )
{
new Float: maxHealth
pev(idUser, pev_max_health, maxHealth)
static iSkillLevel;
iSkillLevel = SM_GetSkillLevel( idUser, SKILL_DEVOTION );
// Human Devotion Skill
if ( iSkillLevel > 0 )
{
maxHealth += iSkillLevel * p_devotion;
}
// For talisman +
// Player has a health bonus from the Periapt of Health
if ( ITEM_Has( idUser, ITEM_HEALTH ) > ITEM_NONE || fWorkTalismanPassive(idUser, arrTalismanActive[idUser]) == TALISMAN_ITEM_HEALTH )
maxHealth += get_pcvar_num( CVAR_wc3_health )
new newHealth = floatround(maxHealth)
return newHealth
}