Raised This Month: $51 Target: $400
 12% 

[TF2] Help with plugin


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Nursik
Senior Member
Join Date: Jul 2016
Location: In TF2
Old 07-22-2016 , 01:36   [TF2] Help with plugin
Reply With Quote #1

PHP Code:
public TF2_OnConditionAdded(clientTFCond:condition)
{
    if (
TF2_GetPlayerClass(client) == TFClass_Pyro && condition == TFCond_Taunting)
    if (
GetActiveIndex(client) == 594)
    {
        
TF2_RemoveCondition(clientTFCond_Ubercharged); //Removes ubercharged condition
        
float damage GetEntPropFloat(clientProp_Send"m_flDamage");
        
SetEntPropFloat(clientProp_Send"m_flDamage"damage*0.25); //Resists 75% of actual damage
        
SetEntProp(clientProp_Data"m_iMaxHealth"175); //Regenerates all health
    
}
}

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

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

stock GetWeaponIndex(weapon)
{
    return 
IsValidEntity(weapon) ? GetEntProp(weaponProp_Send"m_iItemDefinitionIndex"):-1;

This plugin is supposed to remove phlog changes, it compiles, but it doesn't work at all. Any help?

Last edited by Nursik; 07-22-2016 at 01:56.
Nursik is offline
Nursik
Senior Member
Join Date: Jul 2016
Location: In TF2
Old 07-22-2016 , 02:13   Re: [TF2] Help with plugin
Reply With Quote #2

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:
PHP Code:
if (GetEntPropFloat(clientProp_Send"m_flRageMeter") == 100.0
solves it.

Last edited by Nursik; 07-22-2016 at 03:21.
Nursik is offline
BraveFox
AlliedModders Donor
Join Date: May 2015
Location: Israel
Old 07-25-2016 , 02:12   Re: [TF2] Help with plugin
Reply With Quote #3

Wrong place.
Post it on "Scripting"(forum)
__________________
Contact Me:
Steam: NoyB
Discord: Noy#9999
Taking Private Requests

Last edited by BraveFox; 07-25-2016 at 02:12.
BraveFox is offline
Reply



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 08:59.


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