AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   help war3ft human max health (https://forums.alliedmods.net/showthread.php?t=140623)

avril-lavigne 10-14-2010 18:27

help war3ft human max health
 
Hi I want to change max HUMAN hp...and cant
Code:

HU_DevotionAura( id )
{
        if ( !is_user_alive( id ) )
        {
                return;
        }

        static iSkillLevel, DevotionAuraGiven, iHealth;
        iSkillLevel = SM_GetSkillLevel( id, SKILL_DEVOTION );
       
        // Already given
        DevotionAuraGiven = g_HU_DevotionAuraGiven[id];
               
        // Then the user has devotion aura
        if ( iSkillLevel > 0 )
        {
                g_HU_DevotionAuraGiven[id] = p_devotion * iSkillLevel / 7; this is my edit
        }
        else
        {
                g_HU_DevotionAuraGiven[id] = 0;
        }
 
        // Player may even lose HP because of this
        DevotionAuraGiven = g_HU_DevotionAuraGiven[id] - DevotionAuraGiven;
       
        iHealth = get_user_health( id );
        if (iHealth + DevotionAuraGiven < 0)
        {
                set_user_health( id, 1 );
        }
        else
        {
                set_user_health( id, iHealth + DevotionAuraGiven / 7);this is my edit ...
        }
}

I tried if (iHealth >= 255) {
set_user_health( id, 255 );
}

but they still have over 255 hp ... with mask and rings .. up to 560 hp ....
and impossible to kill something with 560 Hp & invisible. As you see / 7 makes lower hp... but i want to do it correctly

One more thing ... Warden can be seen by others on enemy`s spawn...
by ANY race. so model changing - dont work properly... how to make additional checks to it ???


All times are GMT -4. The time now is 10:21.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.