This site is a testing version, but all data is shared with the live forum.


Raised This Month: $ Target: $400
 0% 

FrontLine plugin


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
MAGNAT2645
Senior Member
Join Date: Nov 2015
Location: AlliedMods.net
Old 10-05-2021 , 09:58   Re: FrontLine plugin
Reply With Quote #2

Just add a check before GetEntityClassname (line 437)
Like this:
Code:
    new iWeaponEnt = GetEntPropEnt(attacker, Prop_Send, "m_hActiveWeapon");
    if (iWeaponEnt != -1 && IsValidEntity(iWeaponEnt)) {
        GetEntityClassname(iWeaponEnt, szClassName, sizeof(szClassName));
        if (StrEqual(szClassName, "tf_weapon_knife") && (damagetype & DMG_CRIT == DMG_CRIT))
        {
            //Backstab detected.
            if (IsPlayerInTank[victim]){
                damage = 200.0;
                action = Plugin_Changed;
            }
        }
        if (IsPlayerInTank[attacker] && (damagetype & DMG_CRIT == DMG_CRIT)){
            if (Supercrits[attacker]){
                damage = damage * 2.5;
                action = Plugin_Changed;
            }
        }
        if (IsPlayerInTank[victim] && !IsPlayerInTank[attacker]){
            if (Supercrits[victim] && !(damagetype & TF_DMG_MELEE == TF_DMG_MELEE)){
                damage = damage * 0.55;
                action = Plugin_Changed;
            }
            if (FiresHeavyLasers[victim] && GetClientHealth(victim) >= 2000){
                damage = damage * 0.75;
                action = Plugin_Changed;
            }
            if (InvisiTank[victim] && damage >= 200.0){
                if (TF2_IsPlayerInCondition(victim, TFCond:110)){
                    TF2_RemoveCondition(victim, TFCond:110);
                }
            }
        }
    }
	
	
    return action;
__________________
MAGNAT2645 is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 01:23.


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