How to change idamage on distance?
The Aku make to much dmg on range. I coded something, but i'm not sure if this is going to work. Can somebody with knowlege test this?
Edit: Syntax Error :/ Need some help pls. I'm a NOOB -.-
I put this code in the globallogic_player file under the Callback_PlayerDamage function. I need this getting to work somehow
Code:
range = int (distance(self.origin, eAttacker.origin));
if(range >= 1500 && (isSubStr (sWeapon, "ak47u")))
{
iDamage = 35 - (-0.01 * range)
}else if(range < 1500 && ( isSubStr(sWeapon, "ak47u")))
{
iDamage = 35
}
EDIT:
SOLVED
new problem...hit locations :/
added some switch(shitloc) case blaablaablaa: but the vars and functions from mw2 seems not to be the same -.-
EDIT: SOLVED THIS 2
but now RandomInt( ) function -.- seems there is no help from here and i must figure out everything for myself