Advertisement
Gr8Boi

compact.sqf

Dec 13th, 2015
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.78 KB | None | 0 0
  1. _files = [
  2.     "BuildsOLD\RefuelRepair_npcs.sqf",
  3.     "BuildsOLD\RefuelRepair_stations.sqf"
  4. ];
  5. _sort = {
  6.     {
  7.         _type = typeOf _x;
  8.         _compact = [_type,(getPos _x),(getDir _x)];
  9.         if (_type isKindOf "Man") then {
  10.             outPutUnits = outPutUnits +  ",
  11.             "+str(_compact);       
  12.         } else {
  13.             outPutObjects = outPutObjects +  ",
  14.             "+str(_compact);
  15.         };
  16.         deleteVehicle _x;
  17.     } forEach bigObjectArray;
  18.     bigObjectArray = [];
  19. };
  20. bigObjectArray = [];
  21. outPutUnits = "";
  22. outPutObjects = "";
  23. {
  24.     systemChat ("Compacting "+_x);
  25.     outPutUnits = outPutUnits + "
  26.     /*Units for: "+_x+"*/";
  27.     outPutObjects = outPutObjects + "
  28.     /*Buildings for: "+_x+"*/";
  29.    
  30.     call compile preProcessFile _x;
  31.     call _sort;
  32. } forEach _files;
  33. copyToClipboard (outPutUnits+outPutObjects);
  34. systemChat ("Converted objects");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement