Beispiel #1
0
        public void CreateServerConfigs(string serverGame, string serverName)
        {
            switch (serverGame)
            {
            case (GameServer.CSGO.FullName):
            {
                GameServer.CSGO gameServer = new GameServer.CSGO(serverConfig.ServerID);
                serverConfig.CreateServerDirectory();
                serverConfig.CreateWindowsGSMConfig(serverGame, serverName, GetIPAddress(), GetAvailablePort(gameServer.port), gameServer.defaultmap, gameServer.maxplayers, "", gameServer.additional);

                break;
            }

            case (GameServer.GMOD.FullName):
            {
                GameServer.GMOD gameServer = new GameServer.GMOD(serverConfig.ServerID);
                serverConfig.CreateServerDirectory();
                serverConfig.CreateWindowsGSMConfig(serverGame, serverName, GetIPAddress(), GetAvailablePort(gameServer.port), gameServer.defaultmap, gameServer.maxplayers, "", gameServer.additional);

                break;
            }

            case (GameServer.TF2.FullName):
            {
                GameServer.TF2 gameServer = new GameServer.TF2(serverConfig.ServerID);
                serverConfig.CreateServerDirectory();
                serverConfig.CreateWindowsGSMConfig(serverGame, serverName, GetIPAddress(), GetAvailablePort(gameServer.port), gameServer.defaultmap, gameServer.maxplayers, "", gameServer.additional);

                break;
            }

            case (GameServer.MCPE.FullName):
            {
                GameServer.MCPE gameServer = new GameServer.MCPE(serverConfig.ServerID);
                serverConfig.CreateServerDirectory();

                string port = GetAvailablePort(gameServer.port);
                serverConfig.CreateWindowsGSMConfig(serverGame, serverName, GetIPAddress(), port, gameServer.defaultmap, gameServer.maxplayers, "", gameServer.additional);

                break;
            }

            case (GameServer.RUST.FullName):
            {
                GameServer.RUST gameServer = new GameServer.RUST(serverConfig.ServerID);
                serverConfig.CreateServerDirectory();

                string port = GetAvailablePort(gameServer.port);
                serverConfig.CreateWindowsGSMConfig(serverGame, serverName, GetIPAddress(), port, gameServer.defaultmap, gameServer.maxplayers, "", gameServer.additional);

                break;
            }
            }
        }
Beispiel #2
0
        public void CreateServerConfigs(string serverGame, string serverName)
        {
            switch (serverGame)
            {
            case (GameServer.CSGO.FullName):
            {
                GameServer.CSGO gameServer = new GameServer.CSGO(serverConfig.ServerID);
                serverConfig.CreateServerDirectory();
                serverConfig.CreateWindowsGSMConfig(serverGame, serverName, GetIPAddress(), GetAvailablePort(gameServer.port), gameServer.defaultmap, gameServer.maxplayers, "", gameServer.additional);

                break;
            }

            case (GameServer.GMOD.FullName):
            {
                GameServer.GMOD gameServer = new GameServer.GMOD(serverConfig.ServerID);
                serverConfig.CreateServerDirectory();
                serverConfig.CreateWindowsGSMConfig(serverGame, serverName, GetIPAddress(), GetAvailablePort(gameServer.port), gameServer.defaultmap, gameServer.maxplayers, "", gameServer.additional);

                break;
            }

            case (GameServer.TF2.FullName):
            {
                GameServer.TF2 gameServer = new GameServer.TF2(serverConfig.ServerID);
                serverConfig.CreateServerDirectory();
                serverConfig.CreateWindowsGSMConfig(serverGame, serverName, GetIPAddress(), GetAvailablePort(gameServer.port), gameServer.defaultmap, gameServer.maxplayers, "", gameServer.additional);

                break;
            }

            case (GameServer.MCPE.FullName):
            {
                GameServer.MCPE gameServer = new GameServer.MCPE(serverConfig.ServerID);
                serverConfig.CreateServerDirectory();
                serverConfig.CreateWindowsGSMConfig(serverGame, serverName, GetIPAddress(), GetAvailablePort(gameServer.port), gameServer.defaultmap, gameServer.maxplayers, "", gameServer.additional);

                break;
            }

            case (GameServer.RUST.FullName):
            {
                GameServer.RUST gameServer = new GameServer.RUST(serverConfig.ServerID);
                serverConfig.CreateServerDirectory();
                serverConfig.CreateWindowsGSMConfig(serverGame, serverName, GetIPAddress(), GetAvailablePort(gameServer.port), gameServer.defaultmap, gameServer.maxplayers, "", gameServer.additional);

                break;
            }

            case (GameServer.CS.FullName):
            {
                GameServer.CS gameServer = new GameServer.CS(serverConfig.ServerID);
                serverConfig.CreateServerDirectory();
                serverConfig.CreateWindowsGSMConfig(serverGame, serverName, GetIPAddress(), GetAvailablePort(gameServer.port), gameServer.defaultmap, gameServer.maxplayers, "", gameServer.additional);

                break;
            }

            case (GameServer.CSCZ.FullName):
            {
                GameServer.CSCZ gameServer = new GameServer.CSCZ(serverConfig.ServerID);
                serverConfig.CreateServerDirectory();
                serverConfig.CreateWindowsGSMConfig(serverGame, serverName, GetIPAddress(), GetAvailablePort(gameServer.port), gameServer.defaultmap, gameServer.maxplayers, "", gameServer.additional);

                break;
            }

            case (GameServer.HL2DM.FullName):
            {
                GameServer.HL2DM gameServer = new GameServer.HL2DM(serverConfig.ServerID);
                serverConfig.CreateServerDirectory();
                serverConfig.CreateWindowsGSMConfig(serverGame, serverName, GetIPAddress(), GetAvailablePort(gameServer.port), gameServer.defaultmap, gameServer.maxplayers, "", gameServer.additional);

                break;
            }

            case (GameServer.L4D2.FullName):
            {
                GameServer.L4D2 gameServer = new GameServer.L4D2(serverConfig.ServerID);
                serverConfig.CreateServerDirectory();
                serverConfig.CreateWindowsGSMConfig(serverGame, serverName, GetIPAddress(), GetAvailablePort(gameServer.port), gameServer.defaultmap, gameServer.maxplayers, "", gameServer.additional);

                break;
            }

            case (GameServer.MC.FullName):
            {
                GameServer.MC gameServer = new GameServer.MC(serverConfig.ServerID);
                serverConfig.CreateServerDirectory();
                serverConfig.CreateWindowsGSMConfig(serverGame, serverName, GetIPAddress(), GetAvailablePort(gameServer.port), gameServer.defaultmap, gameServer.maxplayers, "", gameServer.additional);

                break;
            }

            case (GameServer.GTA5.FullName):
            {
                GameServer.GTA5 gameServer = new GameServer.GTA5(serverConfig.ServerID);
                serverConfig.CreateServerDirectory();
                serverConfig.CreateWindowsGSMConfig(serverGame, serverName, GetIPAddress(), GetAvailablePort(gameServer.port), gameServer.defaultmap, gameServer.maxplayers, "", gameServer.additional);

                break;
            }

            case (GameServer._7DTD.FullName):
            {
                GameServer._7DTD gameServer = new GameServer._7DTD(serverConfig.ServerID);
                serverConfig.CreateServerDirectory();
                serverConfig.CreateWindowsGSMConfig(serverGame, serverName, GetIPAddress(), GetAvailablePort(gameServer.port), gameServer.defaultmap, gameServer.maxplayers, "", gameServer.additional);

                break;
            }
            }
        }