예제 #1
0
        public Program(string[] args)
        {
            var configurationProvider = args.Length > 0 ? GetConfigurationProvider(args[0]) : null;

            server = new MtaServer(
                Directory.GetCurrentDirectory(),
                @"net.dll",
                configurationProvider?.GetConfiguration(),
                Configure
                )
            {
                GameType = "Slipe Server",
                MapName  = "N/A"
            };

            System.Console.CancelKeyPress += delegate
            {
                server.Stop();
                waitHandle.Set();
            };

            SetupQueueHandlers();
            SetupBehaviour();
            SetupLogic();

            server.Start();

            waitHandle.WaitOne();
        }
예제 #2
0
        public Program(string[] args)
        {
            var configurationProvider = args.Length > 0 ? GetConfigurationProvider(args[0]) : null;

            server = new Server.MtaServer(
                Directory.GetCurrentDirectory(),
                @"net.dll",
                configurationProvider?.GetConfiguration(),
                Configure
                );

            SetupQueueHandlers();
            SetupBehaviour();
            SetupLogic();

            server.Start();
            Thread.Sleep(-1);
        }