ACE3/addons/respawn/functions/fnc_handleKilled.sqf

34 lines
680 B
Plaintext
Raw Normal View History

2015-01-12 09:07:03 +00:00
/*
2015-01-12 09:49:21 +00:00
Name: ACE_Respawn_fnc_handleKilled
2015-01-12 09:07:03 +00:00
Author(s):
bux578
2015-01-12 09:07:03 +00:00
Description:
Handles the XEH Killed event
2015-01-12 09:07:03 +00:00
Parameters:
0: OBJECT - Killed unit
1: OBJECT - Attacker
2015-01-12 09:07:03 +00:00
Returns:
VOID
*/
#include "script_component.hpp"
2015-06-04 12:30:38 +00:00
PARAMS_1(_killedUnit);
2015-01-12 09:07:03 +00:00
2015-06-04 12:30:38 +00:00
// Saves the gear when the player! (and only him) is killed
if (ACE_player == _killedUnit) then {
GVAR(unitGear) = [];
2015-01-12 09:07:03 +00:00
2015-06-04 12:30:38 +00:00
if (GVAR(SavePreDeathGear)) then {
GVAR(unitGear) = [_killedUnit] call EFUNC(common,getAllGear);
};
2015-01-12 09:07:03 +00:00
};
2015-01-12 09:49:21 +00:00
if (missionNamespace getVariable [QGVAR(showFriendlyFireMessage), false]) then {
[_this, QUOTE(DFUNC(showFriendlyFireMessage)), 2] call EFUNC(common,execRemoteFnc);
2015-01-12 09:07:03 +00:00
};