Advertisement
Guest User

Untitled

a guest
Mar 31st, 2015
194
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.79 KB | None | 0 0
  1. //set up stuff you need to have set up before units initialise. Put everything inside the if(isServer) since this runs on all clients.
  2. diag_log "preset running";
  3. if (isServer) then {
  4.  
  5. _players = playersNumber west; //west since players are blufor.
  6. _traitorcount = floor (_players/4); /// one traitor for every 4 players.
  7. _detectivecount = floor (_players/8); /// one detective for every 4 players.
  8.  
  9. _innocents = [];
  10. { if (isPlayer _x) then { _innocents set [count _innocents, _x]; }; } forEach allUnits;
  11.  
  12. _traitors = [_innocents, _traitorcount, _traitorcount] call compile preprocessFile "randomise.sqf";
  13.  
  14. _innocents = _innocents - _traitors;
  15.  
  16. _detective = [_innocents, _detectivecount, _detectivecount] call compile preprocessFile "randomise.sqf";
  17.  
  18. };
  19. diag_log "preset ended";
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement