Example #1
0
 private static void Shutdown(object sender, EventArgs a)
 {
     MiscFunctions.DeleteFile(@"HLExtract.exe");
     MiscFunctions.DeleteFile(@"HLLib.dll");
     MiscFunctions.DeleteFile(@"7za.exe");
     MiscFunctions.DeleteFile(@"steamcmd.zip");
     MiscFunctions.DeleteFile(@"sourcemod.zip");
     MiscFunctions.DeleteFile(@"mmsource.zip");
     MiscFunctions.DeleteFile(@"addons.zip");
     MiscFunctions.DeleteDir(@"steamcmd");
 }
Example #2
0
 private static void Server(string installpath, string username = "", string password = "",
                            bool steamauth = false, string mounts = "")
 {
     if (installpath != null & username == "" & password == "")
     {
         new ServerFormStuffs().OpenServerForm(installpath);
     }
     else if (installpath == null)
     {
         Console.WriteLine(@"Please specify where to install the server");
         string input = Console.ReadLine();
         if (input != null && input.Contains(@" "))
         {
             input = MiscFunctions.PutIntoQuotes(input);
         }
         Console.WriteLine(input);
         Console.ReadLine();
         new ServerFormStuffs().OpenServerForm(input);
     }
     else if (username != null & password != null & !steamauth & mounts == "")
     {
         ServerStuff fun = new ServerStuff(installpath, username, password);
         fun.RunFun();
     }
     else if (username != "" & password != "" & steamauth & mounts == "")
     {
         ServerStuff fun = new ServerStuff(installpath, username, password, true);
         fun.RunFun();
     }
     else if (username != "" & password != "" & !steamauth & mounts != "")
     {
         ServerStuff fun = new ServerStuff(installpath, username, password, false, mounts);
         fun.RunFun();
     }
     else if (username != "" & password != "" & steamauth & mounts != "")
     {
         ServerStuff fun = new ServerStuff(installpath, username, password, true, mounts);
         fun.RunFun();
     }
 }
Example #3
0
 private static bool CheckifClientOrServer()
 {
     while (true)
     {
         Console.WriteLine(@"Please specify if client or server");
         string output = Console.ReadLine();
         if (output != null && output.ToLower() == @"client")
         {
             return(true);
         }
         if (output != null && output.ToLower() == @"server")
         {
             return(false);
         }
         if (output != null && output.ToLower() == @"fun")
         {
             MiscFunctions.PlaySong();
             continue;
         }
         Console.WriteLine(@"Error server or client not found");
     }
 }