1. Please help me on this. Even though it is a pretty noob question.

    Sooo, I wana create a Plugin but I don't know how to:
    How I should start creating my Project in Visual Studio 2015 Community.
    Add a Reference so I know which methods are available for use.
    Things like spawning an item.

    Normaly when I'm programming something I just check which commands are available for me and use these.
    I wouldn't like to use a editor. Please don't make me to.

    Hope you get what I need, if not just ask me again please.

    Thanks in advance
     
  2. Wulf

    Wulf Community Admin

  3. Good, thanks for the help.
    I was just playing dumb and not using every reference.

    Good good. So I met a problem already.
    Programmed for some time. Was fun.

    So I'm trying to create a shop plugin.
    Now I don't know how to execute a method or a command.
    I'm stuck here:

    Code:
    var buyButton = new CuiButton
                {
                    Button =
                    {
                        Color = "0.5 0.5 0.5 1",
                        Command = ""  /* How do I do this ?? What to add? How to open a methode?
                         Thanks in Advance */
                    },
                    RectTransform =
                    {
                        AnchorMin = "0.05 0.4",
                        AnchorMax = "0.2 0.45"
                    },
                    Text =
                    {
                        Text = "Assault Rifle",
                        Align = TextAnchor.MiddleCenter
                    }            };
     
  4. Wulf

    Wulf Community Admin

    The Command part of the Rust CUI is for use with console commands. You'd need to have a console command registered to a method in your plugin.
     
  5. So just add a console command which does what I need and everything is good?

    If I want to for example go to the next page or just refresh the cut I could easily delete buttons and add more, right? or is there anything else?
     
  6. Wulf

    Wulf Community Admin

    Pretty much, sounds about right.
     
  7. Dang I can't seem to get the command thing to get working.

    Code:
    [Command("assault")]
            void buywep(BasePlayer player)
            {
                Puts("test");
            }
    So that's the command I added.

    And this:
    Code:
    var buyButton = new CuiButton
                {
                    Button =
                    {
                        Color = "0.5 0.5 0.5 1",
                        Command = "assault"
                    },
                    RectTransform =
                    {
                        AnchorMin = "0.05 0.4",
                        AnchorMax = "0.2 0.45"
                    },
                    Text =
                    {
                        Text = "Assault Rifle",
                        Align = TextAnchor.MiddleCenter
                    }            };
    Is the Button which should call that command, but it doesn't work. Can you help me pls?
     
  8. You are using the command from a covalence plugin. For a Rust plugin it looks like this
    Code:
    [ConsoleCommand("testcommand")]
    void testcommand(ConsoleSystem.Arg args)
    {
    }
     
  9. Okay nice thanks.
    Found it out few minutes after you posted, didn't think someone would be that fast.

    Thanks for the help. might ask more questions soon :p
     
  10. Seeing as this is sort of relevant. Where should one start learning how to program for this game? Id like to learn, but I'm not sure where to start.