View Full Version : [TF2] Chaning the mann treads damage stomp from fall
Michalplyoutube
10-28-2014, 14:04
it is posible to?
if yes please write an example
Try this.
#include <sdkhooks>
#define ITEM_MANTREADS 444
public OnClientPutInServer(client) {
SDKHook(client, SDKHook_OnTakeDamage, OnTakeDamage);
}
public Action:OnTakeDamage(victim, &attacker, &inflictor, &Float:damage, &damagetype, &weapon, Float:damageForce[3], Float:damagePosition[3]) {
if(IsValidEntity(weapon) && GetEntProp(weapon, Prop_Send, "m_iItemDefinitionIndex") == ITEM_MANTREADS) {
damage *= 2.0; // Mantreads damaged is multiplied (*) by two...
return Plugin_Changed;
}
return Plugin_Continue;
}
friagram
10-28-2014, 17:26
unfortunately mantreads damage doesn't happen if the attacker doesn't take fall damage
You could just check damagecustom == TF_CUSTOM_BOOTS_STOP instead of checking the entity and all that stuff.
e.g., check out VSH's OnTakeDamage for an example
It doesn't bother checking the itemdefindex
friagram
10-29-2014, 17:12
If you return plugin handled from a fall, damage = 0 , or you set the no fall damage attribute, the mantreads attribute does nothing, and the other player never takes damage. At least, I'm pretty sure.
Dr. Greg House
10-29-2014, 17:39
Mantreads attribute is hardcoded to cause 3 times the falling damage.
Maybe use the new fancy OnTakeDamage_Alive or whatever it's called.
Mantreads attribute is hardcoded to cause 3 times the falling damage.
Maybe use the new fancy OnTakeDamage_Alive or whatever it's called.
wut? but you can literally set damage = 300.0 to bypass its damage
Dr. Greg House
10-30-2014, 00:01
I don't see how I said anything conflicting.
You can check the attribute for yourself.
When you said hardcoded I thought you were saying you can't change the damage.
vBulletin® v3.8.7, Copyright ©2000-2024, vBulletin Solutions, Inc.