Guest User

Untitled

a guest
May 11th, 2012
46
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.08 KB | None | 0 0
  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. }
Advertisement
Add Comment
Please, Sign In to add comment