PDA

View Full Version : [TF2] Help with plugin


Nursik
07-22-2016, 01:36
public TF2_OnConditionAdded(client, TFCond:condition)
{
if (TF2_GetPlayerClass(client) == TFClass_Pyro && condition == TFCond_Taunting)
if (GetActiveIndex(client) == 594)
{
TF2_RemoveCondition(client, TFCond_Ubercharged); //Removes ubercharged condition
float damage = GetEntPropFloat(client, Prop_Send, "m_flDamage");
SetEntPropFloat(client, Prop_Send, "m_flDamage", damage*0.25); //Resists 75% of actual damage
SetEntProp(client, Prop_Data, "m_iMaxHealth", 175); //Regenerates all health
}
}

public TF2_OnConditionRemoved(client, TFCond:condition)
{
if (TF2_GetPlayerClass(client) == TFClass_Pyro && condition == TFCond_Taunting)
if (GetActiveIndex(client) == 594)
{
float damage = GetEntPropFloat(client, Prop_Send, "m_flDamage");
SetEntPropFloat(client, Prop_Send, "m_flDamage", damage*4.0); //Removes damage resistance
}
}

stock GetActiveIndex(client)
{
return GetWeaponIndex(GetEntPropEnt(client, Prop_Send, "m_hActiveWeapon"));
}

stock GetWeaponIndex(weapon)
{
return IsValidEntity(weapon) ? GetEntProp(weapon, Prop_Send, "m_iItemDefinitionIndex"):-1;
}
This plugin is supposed to remove phlog changes, it compiles, but it doesn't work at all. Any help?

Nursik
07-22-2016, 02:13
Okay, so now is the question, what conditions does phlog give on taunt or how do i check them? It probably doesn't give ubercharged condition, as if medic would try to heal him he'd lose it.
EDIT: I changed something and added fRage float, but it's not gonna compile with it.
EDIT2:
if (GetEntPropFloat(client, Prop_Send, "m_flRageMeter") == 100.0) solves it.

BraveFox
07-25-2016, 02:12
Wrong place.
Post it on "Scripting"(forum)