Files
RAGECOOP-V/Server/Program.cs
2021-12-08 13:45:00 +01:00

39 lines
942 B
C#

using System;
using System.IO;
namespace CoopServer
{
class Program
{
public static bool ReadyToStop = false;
static void Main(string[] args)
{
try
{
Console.Title = "GTACOOP:R Server";
if (File.Exists("log.txt"))
{
File.WriteAllText("log.txt", string.Empty);
}
Console.CancelKeyPress += delegate(object sender, ConsoleCancelEventArgs e)
{
if (e.SpecialKey == ConsoleSpecialKey.ControlC)
{
e.Cancel = true;
ReadyToStop = true;
}
};
_ = new Server();
}
catch (Exception e)
{
Logging.Error(e.ToString());
Console.ReadLine();
}
}
}
}