1. I want to add the Oxide/Rust Reference to Visual Studio

    YES I KNOW THERE ARE A LOT OF THREADS THAT ARE SHOWING HOW TO DO THAT but there is no clear tutorial or sth like that..
    I saw the Vilsols tutorial but i dont have the thingy on the right and it was showing the same message(step4) :p

    So i will tell you what i am doing right now:
    1. http://screenshot.sh/ofnyk5PCCoIoM my Visual Studio 2015
    2. I got to: Project -> Add reference and i select the Assembly-Csharp, Oxide.Core, Oxide.Game.Rust, UnityEngine, Oxide.Ext.CSharp and some more.
    3. Okay i'm adding the references to my code so it should look like:
    using Oxide.Core;
    using Oxide.Game.Rust;
    using UnityEngine;
    4. Then there is a yellow line with a "lamp" which says http://screenshot.sh/mGR97FmDn5oJi
    5. RIP Any ideas?
     
  2. Wulf

    Wulf Community Admin

    Clone the Oxide GitHub repo, open it in Visual Studio, create or move your plugin in the Oxide.Game.Rust/Plugins folder, done. :)
     
  3. Easy to say but hard to do :p

    So yeah i dont know anything about github even if i have my own..(Yeah i know no comment)

    How do i clone the Oxide GitHub repo xD?
     
  4. Wulf

    Wulf Community Admin

    You can use a Git tool so that you can keep it updated, or you can click the "Download ZIP" button. https://github.com/OxideMod/Oxide
     
  5. Okay okay right so what do you mean "Open it in Visual Studio" ? How can i do this ?

    Sorry for all these questions but i tried so many times and this time it must work..
     
  6. Wulf

    Wulf Community Admin

    Double-click on the .sln file in the root.
     
  7. So now the auto completion should work right ??

    Because when i type HitInfo or hitinfo it doesnt show me a list or sth like that.

    My Visual Studio look like http://screenshot.sh/mK7yZCA8Gv3ok it shows the Oxide at the top so that a progress xD

    You said "create or move your plugin in the Oxide.Game.Rust/Plugins folder"
    Create.. but what to create there are too many options http://screenshot.sh/mKLWweAGocZ78 .... i'm lost :p
     
  8. PaiN,

    It looks like you do not have the default layout for VS, normally when you have a project open you should see on the right a dockable pane that includes the project explorer on top and the properties explorer on the bottom. You don't want to close these, they are your bread and butter! Browse through the view menu and put these back, they are vital.

    You do not need to put the CS files in any particular place for the dev, the thing about "create or move your plugin in the oxide/plugsins folder" is for when you are done and want to publish it. I have one project for all my plugins myself and they are all in the same folder as the .csproj file.. You can create new classes by right-clicking on the project root on the Project Explorer (top right) and do Add -> New Class. This will create a template class, you can just delete whatever is in there and add code from a random plugin you have and just strip it down to the namespace/class def and rename the class in there to match the filename.

    As for the hitInfo, if you are in a valid class/function body, you can do something like:

    "var a= new Hit" and as you type, VS should propose classes that are loaded and match "Hit" and "HitInfo" should pop in there. If it does not, then you are missing References (see my PM) and/or a "using" statement at the beginning of the class to specify to VS that you want to use this or that reference.

    Once you've finished your line (var a= new HitInfo();) you should be able to just type a. and the properties/members of HitInfo should pop right at you, allowing you to browse them..
     
  9. This says that is you never used classes/functions from these "usings" in your file.
     
  10. Okay works perfectly.. thanks everyone for the help! ;)
     
  11. This is one of Resharper's features BTW PaiN, when you see a lamp on the side it means Resharper has a suggestion for you. He might propose to remove stuff like in this case, or it can be warnings, it can be automatisms (like contracting a complex LINQ statement in a smaller, more efficient one), or simply style issues (for example it will suggest naming convensions for properties vs fields, constants vs variables, etc), and so on.
     
  12. Wulf

    Wulf Community Admin

    No, that was create or move your plugin to Oxide.Game.Rust/plugins, exactly as I said. You'd have the full use of IntelliSense when developing your plugin there, no complex changes needed or copying DLLs around and such.
     
  13. lol, not sure what you're saying here Wulf, but anyways... my way works, been doing it like that for a while now.
     
  14. Wulf

    Wulf Community Admin

    I thought you were trying to correct what I said previously, and I was correcting your correction. ;)

    I wasn't saying your way doesn't work, the way I was saying is a valid method as well. Not referring to the oxide/plugins folder of your server either.
     
  15. Alright I understand now, I didn't read your first post, I thought you were suggesting he copied the .cs file straight to his server installation plugin folder but I now see you were suggesting to use the Oxide project as his compile project. Heck, I should probably download the code to that thing and take a look at it, I'm curious how you guys are hooking stuff :) I asked before Wulf, maybe you know, can we create hooks in a plugin or are those a special gimmick that's limited to whatever way the Oxide DLL's are built?
     
  16. Wulf

    Wulf Community Admin

    Hooks are what we add directly to a game's main DLL so that plugins can run code at that location. To add your own, you'd need to use our patcher tool.
     
  17. Ok so basically you are injecting code in the Dll?
     
  18. Wulf

    Wulf Community Admin

    Yup, pretty much.