Advertisement
Guest User

Untitled

a guest
May 25th, 2015
242
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. sleep 1;
  2. SAH_offers = [];
  3. while {true} do
  4. {
  5. sleep 1;
  6. _copy = SAH_offers;
  7. _players = [];
  8. {
  9. if (isPlayer _x) then {
  10. _players pushBack [_x,getPlayerUID _x];
  11. };
  12. } forEach playableUnits;
  13. {
  14. _isOn = false;
  15. _curOffer = _x;
  16. {
  17. if ((_x select 1) isEqualTo (_curOffer select 0)) then {_isOn = true;};
  18. } forEach _players;
  19. if (!_isOn) then {
  20. _index = -1;
  21. _handled = false;
  22. {
  23. _index = _index + 1;
  24. if (_x isEqualTo _curOffer AND !_handled) then {_copy deleteAt _index;_handled = true;};
  25. } forEach _copy;
  26. };
  27. } forEach SAH_offers;
  28. SAH_offers = _copy;
  29. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement