-
Notifications
You must be signed in to change notification settings - Fork 0
/
onPlayerKilled.sqf
26 lines (22 loc) · 993 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
//WAVE RESPAWN
if (([missionConfigFile >> "missionSettings","waveRespawnEnabled",0] call BIS_fnc_returnConfigEntry) == 1) then {
[] call grad_waverespawn_fnc_onPlayerKilled;
//NORMAL RESPAWN
} else {
_respawnTimeVar = switch (playerSide) do {
case (WEST): {"respawntimeBlu"};
case (EAST): {"respawntimeOpf"};
case (INDEPENDENT): {"respawntimeInd"};
default {"respawntimeBlu"};
};
_respawnTime = [missionConfigFile >> "missionSettings" >> "respawnSettings",_respawnTimeVar,10] call BIS_fnc_returnConfigEntry;
if (_respawnTime > 1800) then {
["Terminate"] call BIS_fnc_EGSpectator;
["Initialize", [player, [WEST,EAST,INDEPENDENT], true]] call BIS_fnc_EGSpectator;
} else {
["Terminate"] call BIS_fnc_EGSpectator;
["Initialize", [player, [playerside], false, false, false, true, true, true, true, true]] call BIS_fnc_EGSpectator;
};
setPlayerRespawnTime _respawnTime;
forceRespawn player;
};