-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathonPlayerKilled.sqf
36 lines (30 loc) · 979 Bytes
/
onPlayerKilled.sqf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
private ["_unit"];
_unit = _this select 0;
_unit unassignItem "NVGoggles";
_unit removeItem "NVGoggles";
if(side group _unit == east) then
{
[[_unit], "Mh_fnc_resolveHuntedCorpse", true, true] call Bis_fnc_MP;
};
if(side group _unit == west) then
{
removeAllActions _unit;
if(typeName (unitBackpack player) == "B_UAV_01_backpack_F") then
{
removeBackpack player;
availableUavs = availableUavs - 1;
publicVariable "availableUavs";
};
};
if(_unit == player && side group player == east) then
{
private _aliveCount = count ([east, { private["_pl"]; _pl = _this select 0; alive _pl; }] call Mh_fnc_getSideUnits);
if(_aliveCount == 0) then
{
["Initialize", [player, [east], false, true, false, false, false, false, false, false]] call BIS_fnc_EGSpectator;
}
else
{
["Initialize", [player, [east], false, false, false, false, false, false, false, false]] call BIS_fnc_EGSpectator;
};
};