Originally Posted by
Toxys
I need to set this in for ex.: sd.gsc right?
I changed the Callback_PlayerDamage function to this but it doesn't seem to work. A little modification about my question: I wan't to print "distance so long" everytime if the player who is in "axis" side is shooting no matter if he is hitting the enemy player or no... just if the distance is longer than 1 meter print this. I hope you understand what I want to say.
PHP Code:
Callback_PlayerDamage(eInflictor, eAttacker, iDamage, iDFlags, sMeansOfDeath, sWeapon, vPoint, vDir, sHitLoc, psOffsetTime)
{
if (isDefined(self) && isDefined(eAttacker) && isPlayer(self) && isPlayer(eAttacker) && self != eAttacker && sWeapon == "kar98k_mp" && distance(self.origin, eAttacker.origin) > 1000)
{
eAttacker iprintlnbold("distance so long");
return;
}
}
1. Add my code in function. NO REPLACE YOUR FUNCTION ONLY FOR MY CODE, just add MY code IN YOUR
PHP Code:
Callback_PlayerDamage(eInflictor, eAttacker, iDamage, iDFlags, sMeansOfDeath, sWeapon, vPoint, vDir, sHitLoc, psOffsetTime)
{
if (isDefined(self) && isDefined(eAttacker) && isPlayer(self) && isPlayer(eAttacker) && self != eAttacker && sWeapon == "kar98k_mp" && distance(self.origin, eAttacker.origin) > 1000)
{
eAttacker iprintlnbold("distance so long");
return;
}
/*
...
code
...
*/
}
2. edit: change 1000 to 1, delete iprintlnbold