Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 11th, 2012  |  syntax: C#  |  size: 1.08 KB  |  hits: 36  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1.         public static void StartServer(int serverID)
  2.         {
  3.             Process proc = new Process();            
  4.             proc.StartInfo.FileName = @"D:\ARMA2OA\arma2oaserver" + serverID + ".exe";
  5.             proc.StartInfo.WorkingDirectory = @"D:\ARMA2OA\";
  6.             proc.StartInfo.Arguments = @"-port=2302 -mod=@dayz;@CBA;@CBA_A2;@CBA_OA;@JayArma2Lib -name=cfgdayz" + serverID + @" -config=cfgdayz" + serverID + @"\server.cfg -cfg=cfgdayz" + serverID + @"\arma2.cfg -profiles=cfgdayz" + serverID + @" -world=Chernarus -exThreads=7 -cpucount=4";
  7.             proc.Start();
  8.             switch (serverID)
  9.             {
  10.                 case 1:
  11.                     proc.ProcessorAffinity = (IntPtr)15;
  12.                     break;
  13.                 case 2:
  14.                     proc.ProcessorAffinity = (IntPtr)240;
  15.                     break;
  16.                 case 3:
  17.                     proc.ProcessorAffinity = (IntPtr)3840;
  18.                     break;
  19.                 case 4:
  20.                     proc.ProcessorAffinity = (IntPtr)61440;
  21.                     break;
  22.             }
  23. }