Quote:
Originally Posted by r3dw3r3w0lf
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.