1. 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.


    7260bfdcae0d9a2adb4c296e887351bf.png
    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
     
  2. Wulf

    Wulf Community Admin

    ConsoleSystem.Arg, not Console.System.Arg
     
  3. Thanks also I've just ran into another issue with the config file not creating any reason why e80fa84aec607b4a3e1a4265e22a6961.png
     
  4. Wulf

    Wulf Community Admin

    LoadDefaultConfig() is only called if a filename doesn't exist under oxide/config for your plugin. After that file exists, it won't be updated unless you specifically update it.
     
  5. 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.
     
  6. Wulf

    Wulf Community Admin

    What they have is actually fine, but it could be done earlier. Init() would be recommended, no need to delay to Loaded() or OnServerInitialized(). You don't even need to have any sort of custom reading, you could just reference the config directly, though storing them in variables would be recommended instead.
     
  7. 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