Advertisement
Guest User

Untitled

a guest
Jul 27th, 2017
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.21 KB | None | 0 0
  1.     if (isMultiplayer) then { // uses playableUnits which only works in MP
  2.         [] spawn {
  3.             waitUntil {
  4.                 sleep 5;
  5.  
  6.                 _isUncon = {
  7.                     _man = _this select 0;
  8.                     _uncon = [_man] call ace_sys_wounds_isUncon;
  9.                     if (isNil "_uncon") then { _uncon = false; };
  10.                     _uncon
  11.                 };
  12.  
  13.                 _countAllWest = { (_x getVariable ["playerSide", side player] == west) && (isPlayer _x) } count playableUnits;
  14.                 _countAllEast = { (_x getVariable ["playerSide", side player] == east) && (isPlayer _x) } count playableUnits;
  15.  
  16.                 _countWest = { (_x getVariable ["playerSide", side player] == west) && (alive _x) && ( (_x distance specPen) > 200) && (isPlayer _x) && !([_x] call _isUncon) } count allUnits;
  17.                 if (_countWest < (_countAllWest / 4) ) then {
  18.                     sleep 1; // allow final death to sync
  19.                     BLUFOR_CC = true;
  20.                     publicVariable "BLUFOR_CC";
  21.                 };
  22.  
  23.                 _countEast = { (_x getVariable ["playerSide", side player] == east) && (alive _x) && ( (_x distance specPen) > 200) && (isPlayer _x) && !([_x] call _isUncon) } count playableUnits;
  24.                 if (_countEast < (_countAllEast / 4) ) then {
  25.                     sleep 1; // allow final death to sync
  26.                     BLUFOR_CC = true;
  27.                     publicVariable "BLUFOR_CC";
  28.                 };
  29.  
  30.             false };
  31.         };
  32.     };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement