1. Nerus

    Nerus Naked Wanderer

    Hi, i tried to create plugin but I have problems:
    Code (Text):

    1) error CS0246: The type or namespace name `ConsoleSystem' could not be found. Are you missing an assembly reference?
    2) error CS0103: The name `SaveRestore' does not exist in the current context
     
    Where are those references ?

    Example:
    Code (Text):
    using UnityEngine;

    namespace Oxide.Plugins
    {
        [Info("Example", "Oxide Team", 1.0)]
        [Description("This example illustrates how to create a console command.")]
        class Example : RustPlugin
        {
            [ConsoleCommand("plugin.save")]
            private void SaveCommand(ConsoleSystem.Arg arg)
            {
                PrintToConsole(arg.Player(), "Saving the world data");
                SaveRestore.Save();
            }
        }
    }
     
    Regards,
    Nerus.
     
    Last edited: Sep 9, 2015
  2. Wulf

    Wulf Community Admin Community Admin Oxide Developer

    If you are compiling it with Visual Studio, you'd need to add references to those. If you are getting the errors in your server itself, you'd need to add the reference or using statement at the top of the plugin. Also note that you are using an example that was made for Rust, not The Forest. You should be using ForestPlugin, and the whole SaveCommand is wrong.

    This is where the Docs need updating. ;)
     
  3. Nerus

    Nerus Naked Wanderer

    OK, this project for "The Forest" is in early development like the game :)

    How to get some events from the game (management code) like OnPlayerConnect(Client client), PlayerSaveGame(Player player) etc... ?

    Regards,
    Nerus.
     
    Last edited: Sep 9, 2015
  4. Wulf

    Wulf Community Admin Community Admin Oxide Developer

    It doesn't have any of those yet, but I do have a lot locally I am working on, and @Nogrod has dedicated server spawning working I believe.
     
  5. Nerus

    Nerus Naked Wanderer

    How I can help oxide project and get some skills ?
     
  6. Wulf

    Wulf Community Admin Community Admin Oxide Developer

    I can't think of anything specific right now, but feel free to take a look around. :)