Raised This Month: $ Target: $400
 0% 

[TF2] Bot Buff Health/Damage


Post New Thread Reply   
 
Thread Tools Display Modes
SPYderman
Senior Member
Join Date: Aug 2013
Old 09-19-2013 , 18:22   Re: [TF2] Bot Buff Health/Damage
Reply With Quote #11

Quote:
Originally Posted by r3dw3r3w0lf View Post
Code:
#include <sourcemod>
#include <sdkhooks>
#include <tf2_stocks>
 
public OnPluginStart()
{
    for(new i = 1; i <= MaxClients; i++)
    {
        SDKHook(i, SDKHook_OnTakeDamage, OnTakeDamage);
    }
}
 
public OnClientPutInServer(client)
{
    SDKHook(client, SDKHook_OnTakeDamage, OnTakeDamage);
}
 
public Action:OnTakeDamage(victim, &attacker, &inflictor, &Float:fDamage, &type)
{
    if(victim == attacker)
    {
        return Plugin_Continue;
    }
    else if(GetClientTeam(attacker) == 3)
    {
        new TFClassType:class = TF2_GetPlayerClass(attacker);
        switch(class)
        {
        case TFClass_DemoMan: fDamage *= 0.7;
        case TFClass_Engineer: fDamage *= 0.7;
        case TFClass_Heavy: fDamage *= 0.7;
        case TFClass_Medic: fDamage *= 0.7;
        case TFClass_Pyro: fDamage *= 0.7;
        case TFClass_Scout: fDamage *= 0.7;
        case TFClass_Sniper: fDamage *= 0.7;
        case TFClass_Soldier: fDamage *= 0.7;
        case TFClass_Spy: fDamage *= 0.7;
        }
    }
    return Plugin_Changed;
}
I compiled that, that should work. The defines weren't working for whatever reason and I accidentally put a semicolon at the end of the OnClientPutInServer function.

- Jack
I tried this, still didn't work. I tried the one before that and removed all the mistakes there were and didn't work either. I made an attempt to change the fDamage to 100.0, but there was just no difference. Now that I think of it, would it be possible to give red bots the Crits and Uber addcond? Without having an admin to manually give it to them, of course.
SPYderman 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:28.


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