1. Oxide for Rust Legacy has been discontinued and is no longer supported. No updates or additions will be made, and Rust Legacy-specific plugin submissions will no longer be accepted. We recommend upgrading to the latest version of Rust as able.
    Dismiss Notice
  1. Rafael Karczevski

    Rafael Karczevski Naked Wanderer

  2. Wulf

    Wulf Community Admin Community Admin Oxide Developer

    The BasePlayer error is because you wrote the plugin using Rust code, not Rust Legacy. The "time traveling" warning is common with Rust Legacy, it means your server isn't keeping accurate time. The other error at the top means you aren't using an official/Steam version of the server.
     
  3. Rafael Karczevski

    Rafael Karczevski Naked Wanderer

  4. Wulf

    Wulf Community Admin Community Admin Oxide Developer

    That's not updated really for Rust Legacy yet. You'd need to use NetUser netuser instead of BasePlayer.
     
  5. Rafael Karczevski

    Rafael Karczevski Naked Wanderer

    How would the webrequest code? Would you help me?
     
  6. Wulf

    Wulf Community Admin Community Admin Oxide Developer

    The rest of the code would be the same.
     
  7. Rafael Karczevski

    Rafael Karczevski Naked Wanderer

    Then just replace the base player for NetUser ?
     
  8. Wulf

    Wulf Community Admin Community Admin Oxide Developer

    Yes, that should be it.
     
  9. Rafael Karczevski

    Rafael Karczevski Naked Wanderer

  10. Wulf

    Wulf Community Admin Community Admin Oxide Developer

    That would be a C# error in your code, not specific to Oxide. Google for that error and compare it to what you have on the line it shows.
     
  11. Rafael Karczevski

    Rafael Karczevski Naked Wanderer

    Error in WebRequest
    UploadDeImagens.com.br - Sem_título.png

    Code (Text):
    using Oxide.Core;
    using Oxide.Core.Libraries;

    namespace Oxide.Plugins
    {
        [Info("EpicPlugin", "Unknown", 1.0)]
        [Description("This example illustrates how to use a GET WebRequest.")]

        class EpicPlugin : RustLegacyPlugin
        {
            [ChatCommand("getrequest")]
            void GetRequest(NetUser netuser, string command, string[] args)
            {
                webrequest.EnqueueGet("http://www.google.com/", (code, response) => GetCallback(code, response, player), this);
            }

            void GetCallback(int code, string response, NetUser netuser)
            {
                if (response == null || code != 200)
                {
                    Puts($"Error: {code} - Couldn't get an answer from Google for {player.displayName}");
                    return;
                }

                Puts($"Google answered for {player.displayName}: {response}");
            }
        }
    }
     
  12. Wulf

    Wulf Community Admin Community Admin Oxide Developer

    As the error says, player does not have contain a definition for displayName. I believe you'd want netuser.displayName, but you can easily check this by looking in Rust Legacy's Assembly-CSharp.dll using JustDecompile, or by setting up a project in Visual Studio 2015.
     
    Last edited: Apr 25, 2016
  13. Gute

    Gute Shack Builder Plugin Developer

    Code (Text):
            void GetCallback(int code, string response, NetUser netuser)
            {
                if (response == null || code != 200)
                {
                    Puts($"Error: {code} - Couldn't get an answer from Google for {netuser.displayName}");
                    return;
                }

                Puts($"Google answered for {netuser.displayName}: {response}");
            }
        }
    }
    Teste isso.
    Place in Portuguese because he understands better.
     
  14. Wulf

    Wulf Community Admin Community Admin Oxide Developer

    The forums are supported in English only, but you're more than welcome to help via PM.
     
  15. Rafael Karczevski

    Rafael Karczevski Naked Wanderer

    Erro in WebRequest
     
  16. Wulf

    Wulf Community Admin Community Admin Oxide Developer

    Update to the latest Oxide version, you're quire a few versions behind. Oxide for Rust Legacy | Oxide
     
  17. Rafael Karczevski

    Rafael Karczevski Naked Wanderer

    Resolved, thanks for helping and sorry for the inconvenience
     
  18. Wulf

    Wulf Community Admin Community Admin Oxide Developer

    No problem, here to help.