Jump to content
GIGN Forum

War3-mask


Recommended Posts

    // Mask of Death
    if ( ITEM_Has( iAttacker, ITEM_MASK ) > ITEM_NONE && p_data_b[iAttacker][PB_ISCONNECTED])
    {
        new iHealth = get_user_health( iAttacker );
        new iBonusHealth = floatround( float( iDamage ) * get_pcvar_float( CVAR_wc3_mask ) );
        
        new iVampiricBonus = p_data_b[iAttacker][PB_HEXED] ? 0 : SM_GetSkillLevel( iAttacker, SKILL_VAMPIRICAURA );

        // Then the user already gets a bonus, lets lower the total amount the user is going to get
        if ( iVampiricBonus > 0 )
        {
            iBonusHealth /= iVampiricBonus;
        }
        
        // User needs to be set to max health
        if ( iHealth + iBonusHealth > get_user_maxhealth( iAttacker ) )
        {
            set_user_health( iAttacker, get_user_maxhealth( iAttacker ) );
        }
        
        // Give them bonus
        else
        {
            set_user_health( iAttacker, iHealth + iBonusHealth );
        }

        SHARED_Glow( iAttacker, 0, iBonusHealth, 0, 0 );

        Create_ScreenFade( iAttacker, (1<<10), (1<<10), (1<<12), 0, 255, 0, g_GlowLevel[iAttacker][1] );
    }

Gribu pafixot tadu lietu , ka. kad juzoju wardenam ultimate vinam daudz hp rodas, un kad iesauj kadam tad man paliek 100. no visiem piem: 700. varetu palidzet fix to :(

Link to comment
Share on other sites

Izsakies skaidrāk.., es piemēram nesapratu.

Gribu pateikt, ka HL engine vairāk par 255 hp vizuāli nedabūsi. HP uz ekrāna tiek rādīts ar bitiem. So, ja tev ir 700 hp, tad tev uz ekrāna rādīs 200 hp.

Ja tev ir 260 hp, tad uz ekrāna rādīs 5hp.. ja ir 300, tad 45hp u.t.t. Nebrīnies, ja ir tādi nelieli bugi.

Link to comment
Share on other sites

To es sapratu, un zinu.

Ka taa rada, bet lieta ir tada ka paliek 100 hp tieshi, 100.

nevis taka tas gljuks :P to es zinaju.

Gribu uztaisit lai mask of death regeno hp tik cik ir, piem tas wardena skills un preparete +80

ta lai vinam regeno vissus 780.

Link to comment
Share on other sites

// User needs to be set to max health
if ( iHealth + iBonusHealth > get_user_maxhealth( iAttacker ) )
{
      set_user_health( iAttacker, get_user_maxhealth( iAttacker ) );
}
else
{
//to par health izlaid
}

Dzēs ārā.

EDIT: tā koda vietā atstāj:

set_user_health( iAttacker, iHealth + iBonusHealth );

Edited by shine
Link to comment
Share on other sites

Un kaa tad izskatiisies??? sadi?

    // Mask of Death
    if ( ITEM_Has( iAttacker, ITEM_MASK ) > ITEM_NONE && p_data_b[iAttacker][PB_ISCONNECTED])
    {
        new iHealth = get_user_health( iAttacker );
        new iBonusHealth = floatround( float( iDamage ) * get_pcvar_float( CVAR_wc3_mask ) );
        
        new iVampiricBonus = p_data_b[iAttacker][PB_HEXED] ? 0 : SM_GetSkillLevel( iAttacker, SKILL_VAMPIRICAURA );

        // Then the user already gets a bonus, lets lower the total amount the user is going to get
        if ( iVampiricBonus > 0 )
        {
            iBonusHealth /= iVampiricBonus;
        }
        
        // Give them bonus
        else
        {
            set_user_health( iAttacker, iHealth + iBonusHealth );
        }

        SHARED_Glow( iAttacker, 0, iBonusHealth, 0, 0 );

        Create_ScreenFade( iAttacker, (1<<10), (1<<10), (1<<12), 0, 255, 0, g_GlowLevel[iAttacker][1] );
    }

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...