Guest User

Untitled

a guest
Apr 25th, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.56 KB | None | 0 0
  1. if !(isServer) exitWith {};
  2. _objectList = _this;
  3. _playersList = [];
  4. {
  5.     if (_x isKindOf "MAN") then {_playersList = _playersList + [_x]};
  6. } forEach _objectList;
  7. _randomIndex = floor(random count _playersList);
  8. _pickedPlayer = _playersList select _randomIndex;
  9. player globalChat format ["DEBUG: _playersList %1, _randomIndex %2, _pickedPlayer %3", _playersList, _randomIndex, _pickedPlayer];
  10. _pickedPlayer setVariable ["DIETC_saboteur", true, true];
  11. {
  12.    _pickedPlayer setVariable ["DIETC_saboteur", false, true];
  13. } forEach (_playersList - [_pickedPlayer] );
Add Comment
Please, Sign In to add comment