Jump to content
RAGE Multiplayer Community

ServerMan with console commands (C#)

Recommended Posts

Hi all,

I modified the old ServerMan and so that you can send commands to the console.


Add new class to server-side:

public class CommandLine
        public static void CmdInput()
                string command = Console.ReadLine();
                if (command.Length > 0)
                    if (command.Equals("notifyhello"))
                      	NAPI.Util.ConsoleOutput("[INFO] You send notification 'Hello!' to all");
                        Console.WriteLine("ERROR: Command not found!");


And add into server-side ResourceStart event:

public void ResourceStart()
  Thread cmdLine = new Thread(new ThreadStart(CommandLine.CmdInput));



Edited by JackHunter
Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...