So i'm currently working on a project and it's fairly simple just 1 thing does not work in it and it's the command said in game sending the server console a command to execute.
So my issue is that when they type in the authentication key and their steam id and it gets transfered over to the console function, i want the server console to execute a command that will execute the ownerid steamid name command.
Any help would be great
Sending a reply to the server console?
Discussion in 'Rust Development' started by Captain Zip, Aug 5, 2017.
-
Wulf Community Admin
ConsoleSystem.Arg, not Console.System.Arg
-
-
Wulf Community Admin
-
Adding on to what Wulf said, you would have to fetch the values from the config in a hook such as Init() or Loaded() for when the config has been generated.
-
Wulf Community Admin
-
2 ways:
1. arg.ReplyWith(string text)
2. SendReply(ConsoleSystem.Arg arg, string format, params object[] args)
if you would use the first one - it can be used only once, so you have to store all of your message in one string. if you would call it the second time - nothing would be printed.
If you would use the second one - it would just use Puts for the console.
Also - the second one automaticly makes string.Format for args =3