Advertisement
Marz1pan

Untitled

Oct 28th, 2019
201
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.13 KB | None | 0 0
  1. #include "\ocap\script_macros.hpp"
  2. params ["_victim", "_killer", "_instigator"];
  3.  
  4. if (_killer == _victim) then {
  5.         _killer = _victim getVariable ["ace_medical_lastDamageSource", _killer];} else {_killer};
  6.         if (isNull _instigator) then {_instigator = UAVControl vehicle _killer select 0};
  7.         if (isNull _instigator) then {_instigator = _killer};
  8.  
  9. // [ocap_captureFrameNo, "killed", _victimId, ["null"], -1];
  10. private _victimId = _victim getVariable ["ocap_id", -1];
  11. if (_victimId == -1) exitWith {};
  12. private _eventData = [ocap_captureFrameNo, "killed", _victimId, ["null"], -1];
  13.  
  14. if (!isNull _killer) then {
  15.     _killerId = _killer getVariable ["ocap_id", -1];
  16.     if (_killerId != -1) then {
  17.         private _killerInfo = [];
  18.         if (_killer isKindOf "CAManBase") then {
  19.             _killerInfo = [
  20.                 _killerId,
  21.                 getText (configFile >> "CfgWeapons" >> currentWeapon _killer >> "displayName")
  22.             ];
  23.         } else {
  24.             _killerInfo = [_killerId];
  25.         };
  26.  
  27.         _eventData = [
  28.             ocap_captureFrameNo,
  29.             "killed",
  30.             _victimId,
  31.             _killerInfo,
  32.             round(_killer distance _victim)
  33.         ];
  34.     }; 
  35. };
  36.  
  37. [":EVENT:", _eventData] call ocap_fnc_extension;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement