player2_dz

Untitled

Nov 3rd, 2015
216
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.56 KB | None | 0 0
  1. p2b_servGetEligiblePlayers = {
  2.     call p2b_servCheckGroups;
  3.  
  4.     p2b_eligiblePlayers = [];
  5.  
  6.     {
  7.         _unit           = _x;
  8.         _isOk           = false;
  9.         _unitPlayer     = (isPlayer _unit);
  10.         _unitAlive      = (alive _unit);
  11.         _inGroup        = (_unit in p2b_playersWithGroups);
  12.         _selectedBefore = (_unit in p2b_selectedBefore);
  13.         _optOut         = (_unit getVariable ["p2bOptOut", false]);
  14.         _isOk           = !(_inGroup || _selectedBefore || _optOut || !_unitPlayer || !_unitAlive);
  15.  
  16.         if (_isOk) then {
  17.             p2b_eligiblePlayers pushBack _unit;
  18.         };
  19.  
  20.     } forEach (allUnits);
  21.  
  22. }
Advertisement
Add Comment
Please, Sign In to add comment