mirror of
https://github.com/RaidMax/IW4M-Admin.git
synced 2025-07-07 04:19:10 -05:00
tweaked the custom callbacks and added two new fields that are logged
prevent script kill events with no valid origin or target from being triggered
This commit is contained in:
@ -14,9 +14,11 @@ Callback_PlayerKilled( eInflictor, attacker, iDamage, sMeansOfDeath, sWeapon, vD
|
||||
{
|
||||
victim = self;
|
||||
_attacker = attacker;
|
||||
if (!isDefined(attacker))
|
||||
if (!isPlayer(attacker) && isDefined(attacker.owner))
|
||||
_attacker = attacker.owner;
|
||||
else if(!isPlayer(attacker) && sMeansOfDeath == "MOD_FALLING")
|
||||
_attacker = victim;
|
||||
|
||||
logPrint("ScriptKill;" + _attacker.guid + ";" + victim.guid + ";" + _attacker.origin + ";" + victim.origin + ";" + iDamage + ";" + sWeapon + ";" + sHitLoc + ";" + sMeansOfDeath + "\n");
|
||||
logPrint("ScriptKill;" + _attacker.guid + ";" + victim.guid + ";" + _attacker.origin + ";" + victim.origin + ";" + iDamage + ";" + sWeapon + ";" + sHitLoc + ";" + sMeansOfDeath + ";" + _attacker.angles + ";" + gettime() + "\n");
|
||||
self maps\mp\gametypes\_damage::Callback_PlayerKilled( eInflictor, attacker, iDamage, sMeansOfDeath, sWeapon, vDir, sHitLoc, psOffsetTime, deathAnimDuration );
|
||||
}
|
Reference in New Issue
Block a user