Ejemplo n.º 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();
        }
Ejemplo n.º 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);
        }