From 7312c9194189823602031b0fe3e44fc2296cb8c6 Mon Sep 17 00:00:00 2001 From: vbawol Date: Sun, 2 Feb 2014 10:42:39 -0600 Subject: [PATCH] Update fnc_plyrHit.sqf --- SQF/dayz_server/compile/fnc_plyrHit.sqf | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/SQF/dayz_server/compile/fnc_plyrHit.sqf b/SQF/dayz_server/compile/fnc_plyrHit.sqf index c043db77f..7af0ce800 100644 --- a/SQF/dayz_server/compile/fnc_plyrHit.sqf +++ b/SQF/dayz_server/compile/fnc_plyrHit.sqf @@ -16,6 +16,11 @@ else _weapon = _weapon select 0; }; +if (_weapon == "" and (vehicle _attacker) != _attacker) then { + _vehicle = typeOf (vehicle _attacker); + _weapon = getText (configFile >> "CfgVehicles" >> _vehicle >> "displayName"); +}; + _distance = _victim distance _attacker; diag_log format["PHIT: %1 was hit by %2 with %3 from %4m with %5 dmg", _victim, _attacker, _weapon, _distance, _damage]; @@ -24,4 +29,4 @@ _victim setVariable["AttackedBy", _attacker, true]; _victim setVariable["AttackedByName", (name _attacker), true]; //_victim setVariable["AttackedByWeapon", (currentWeapon _attacker), true]; _victim setVariable["AttackedByWeapon", _weapon, true]; -_victim setVariable["AttackedFromDistance", _distance, true]; \ No newline at end of file +_victim setVariable["AttackedFromDistance", _distance, true];