Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "\ocap\script_macros.hpp"
- params ["_victim", "_killer", "_instigator"];
- private _victimId = _victim getVariable ["ocap_id", -1];
- if (_victimId == -1) exitWith {};
- private _frame = ocap_captureFrameNo;
- {player setVariable ["myRealKiller", (player getVariable "ace_medical_lastDamageSource") , true];} remoteExec ["call", _victim];
- sleep 1;
- // [ocap_captureFrameNo, "killed", _victimId, ["null"], -1];
- private _eventData = [_frame, "killed", _victimId, ["null"], -1];
- if (_killer == _victim) then {
- _killer = _victim getVariable ["myRealKiller", _killer];} else {_killer};
- if (isNull _instigator) then {_instigator = UAVControl vehicle _killer select 0};
- if (isNull _instigator) then {_instigator = _killer};
- if (!isNull _instigator) then {
- _killerId = _instigator getVariable ["ocap_id", -1];
- if (_killerId != -1) then {
- private _killerInfo = [];
- if (_instigator isKindOf "CAManBase") then {
- _killerInfo = [
- _killerId,
- getText (configFile >> "CfgWeapons" >> currentWeapon _instigator >> "displayName")
- ];
- } else {
- _killerInfo = [_killerId];
- };
- _eventData = [
- _frame,
- "killed",
- _victimId,
- _killerInfo,
- round(_instigator distance _victim)
- ];
- };
- };
- [":EVENT:", _eventData] call ocap_fnc_extension;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement