Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if (isServer) then {
- // time limit
- [] spawn {
- sleep (sandi_timeLimit); // 60 minutes
- ["sandi_endMission", ["time"]] call CBA_fnc_globalEvent;
- };
- // check for dead teams
- if (isMultiplayer) then { // uses playableUnits which only works in MP
- [] spawn {
- waitUntil {
- sleep 5;
- _isUncon = {
- _man = _this select 0;
- _uncon = [_man] call ace_sys_wounds_isUncon;
- if (isNil "_uncon") then { _uncon = false; };
- _uncon
- };
- _countAll = { (isPlayer _x) } count playableUnits;
- _countWest = { (side _x == west) && (alive _x) && ( (_x distance specPen) > 200) && (isPlayer _x) && !([_x] call _isUncon) } count allUnits;
- if (_countWest < (_countAll / 10) ) then {
- sleep 1; // allow final death to sync
- ["sandi_endMission", ["bluDeaths"]] call CBA_fnc_globalEvent;
- };
- _countEast = { (side _x == east) && (alive _x) && ( (_x distance specPen) > 200) && (isPlayer _x) && !([_x] call _isUncon) } count playableUnits;
- if (_countEast < (_countAll / 10) ) then {
- sleep 1; // allow final death to sync
- ["sandi_endMission", ["redDeaths"]] call CBA_fnc_globalEvent;
- };
- false };
- };
- };
- };
Add Comment
Please, Sign In to add comment