Posts: 4
Threads: 3
Joined: Aug 2006
Reputation:
0
Is it possible to run srcds in the windows commandline? I don't mean start it, I mean instead of srcds opening its own console, have all the output go through the windows console without opening the srcds console. (this is confusing to explain)
The reason I want to do this is because I want to capture the output of srcds with an app i'm writing. Capturing it from the srcds console causes it to crash because my app captures all the output and it never reaches the srcds console. When the console checks to make sure that it has written the lines, it finds that none have been written and crashes (with the error CTextConsoleWin32::GetLine: !GetNumberOfConsoleInputEvents). Simply put, my app reads everything srcds is outputting, and the srcds console is completely empty.
I'm writing the app in C# and I understand this is kind of an unusual question for these forums, but I was hoping maybe someone would have a suggestion or two.
Thanks in advance.
Posts: 5,178
Threads: 65
Joined: Mar 2005
Reputation:
22
Hi there,
I'm afraid you can't run the SRCDS in the windows console, it's a seperate program that uses part of the windows console but still heavily edited. The SRCDS will always open as a new window since it's a standalone program non-dependent of anything.
There is a log function built in the server, it's a bit messy with dates and time infont but it captures everything that comes up in the console, I'm not sure if you can use that since I don't know what you want to do with it.
If you want to see it or send it somewhere on the fly you'll have to write a server plugin in C++. I write a bit of plugins myself so I can give you some help but I'm not really pro at it.
Posts: 4
Threads: 3
Joined: Aug 2006
Reputation:
0
Basically, I want to write a wrapper around the srcds application to capture all the console output and make a remote interface for it so I could do things like start the server, stop the server and other actions remotely. I can already do this with mani, rcon, and I have a remote desktop connection as well, but I'd like to try and write a standalone application that wraps a lot of administration features into one intuitive GUI.
I looked at writing a plugin, but I couldn't find a basic sample plugin to modify to meet my needs, but the plugin route sounds the best because I could retrieve information the console doesn't output from srcds.
The app I'm writing would basically be its own mini-server that would allow users to connect to it and serve information obtained from srcds and grab statistics and other information as well as allowing the user to issue commands and do server management.
If you think you could help with this, I could really use it because I don't really know where to start when it comes to server plugins.
Posts: 12
Threads: 2
Joined: Apr 2009
Reputation:
0
well this sucks im trying to do the same thing but with autoit and i fail so if i find an answer i will post here
Posts: 47
Threads: 4
Joined: Dec 2010
Reputation:
0
Run it as a service, then stopping etc can be done via a phpexec() command.
I run it in a similar way, so I have a webpage, which uses phpexec(net start css1).
Posts: 3,906
Threads: 404
Joined: Oct 2007
Reputation:
21
Please do not raise old, dead threads from the dead. If you need similar help, please feel free to post your own thread with your question. Remember to read the required READ ME FIRST thread for the area in which you are posting.
Thread Locked.
~ Mooga ...w00t? -
SRCDS.com on Twitter
Please do not PM me for server related help
fqdn Wrote:if you've seen the any of the matrix movies, a game server is not all that different. it runs a version of the game that handles the entire world for each client connected. that's the 2 sentence explanation.