Advertisement
Marz1pan

Untitled

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