Hi guys,
I'm looking to modify a damage, but only if the damage type is a specific type...
So, this will effectively double my damage if the damage type is DMG_CRUSH...
What I'd like to do, is double my damage for any type EXCEPT for crush....
How would i do this?
Or, in terms of the actual output i'm after...
If attack someone with a knife, then do double damage. But if i deal damage by any other means, then don't change it all.
I've tried using:
However this only looks at what weapon that im actually holding - so in the event where i use a spell (think Chain Lightning for instance), it still sees me as holding a knife, so it doubles the damage... Although in this instance, i don't want it to double the damage unless i physically slash them with my knife....
What's the easiest way to do this please?
Cheers
I'm looking to modify a damage, but only if the damage type is a specific type...
Code: [Select]
public OnW3TakeDmgAllPre(victim,attacker,Float:damage)
{
if (W3GetDamageType() & DMG_CRUSH)
{
War3_DamageModPercent(2.0)
}
}So, this will effectively double my damage if the damage type is DMG_CRUSH...
What I'd like to do, is double my damage for any type EXCEPT for crush....
How would i do this?
Or, in terms of the actual output i'm after...
If attack someone with a knife, then do double damage. But if i deal damage by any other means, then don't change it all.
I've tried using:
Code: [Select]
new String:weapon[32];
GetClientWeapon(attacker,weapon,32);
if(StrEqual(weapon,"weapon_knife"))However this only looks at what weapon that im actually holding - so in the event where i use a spell (think Chain Lightning for instance), it still sees me as holding a knife, so it doubles the damage... Although in this instance, i don't want it to double the damage unless i physically slash them with my knife....
What's the easiest way to do this please?
Cheers


Logged