Create Console Commands
On this page we will explain how to create own console commands.
Last updated
Was this helpful?
On this page we will explain how to create own console commands.
Last updated
Was this helpful?
Onsharp offers a possiblity to create own console commands. Onset itself does not implement any kind of console input. Onsharp puts a console management layer above the Onset server and allows you to create those interactions.
The console command creation does not differentiate much from the normal the only big change is, that you don't have any player at the first parameter.
So to create such a console command you just need to create a handling method and mark it as console command:
You see, its almost the same, but what you also can see is, that you need to define the command description because the console command manager offers the help command to see which commands are registered and how to use them.
The methods to register them are:
Runtime.RegisterConsoleCommands()
: for non static methods
Runtime.RegisterConsoleCommands<>()
: for static methods
Registering commands manually is the same procedure as with the normal commands. Please head over to read more about it: .