stock get_user_maxhealth( idUser )
{
	new maxHealth = 100

	static iSkillLevel;
	iSkillLevel = SM_GetSkillLevel( idUser, SKILL_DEVOTION );

	// Human Devotion Skill
	if ( iSkillLevel > 0 )
	{
		maxHealth += iSkillLevel * p_devotion;
	}

	//Для 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 );
		
	if(maxHealth > 255)
		maxHealth = 255;
		
	return maxHealth
}

// Function checks to see if the weapon is a pistol
stock SHARED_IsSecondaryWeapon( iWeaponID )
{
	// Check for Counter-Strike or Condition Zero
	if ( g_MOD == GAME_CSTRIKE || g_MOD == GAME_CZERO )
	{
		if ( iWeaponID == CSW_ELITE || iWeaponID == CSW_FIVESEVEN || iWeaponID == CSW_USP || iWeaponID == CSW_GLOCK18 || iWeaponID == CSW_DEAGLE || iWeaponID == CSW_P90 )
		{
			return true;
		}
	}
	
	return false;
}


stock get_user_actualhealth(idUser)
{

	new health = get_user_health(idUser);

	// Player has god mode
	if ( health > 1500 )
		return health - 2048;

	// Player will evade the next shot
	if ( health > 500 )
		return health - 1024;

	return health;
}


// Функция проверяющая доступ к бонусу XP
public fBonusXP()
{
    new szFlags[24];
    get_pcvar_string(CVAR_wc3_bonus_xp_flag, szFlags, 23 );

    return ( read_flags( szFlags ) );
}

// Функция проверяющая доступ к низким ценам
public fBuyItemCost()
{
    new szFlags[24];
    get_pcvar_string(CVAR_wc3_cost_vip_flag, szFlags, 23 );

    return ( read_flags( szFlags ) );
}

stock fTagWar3ft()
{
	new szTag[64];
	formatex(szTag, sizeof(szTag) - 1, "!y%L!t%L!y%L ",LANG_PLAYER,"WC3_BRACKET_LEFT",LANG_PLAYER,"WC3_MODCLIENT",LANG_PLAYER,"WC3_BRACKET_RIGHT");
	return szTag;
}