1. Is there a way to close player inventory or cancel the looting?

    I am doing this by putting him to sleep but maybe there is another way.
     
  2. If you are calling this as soon as a player opens something
    NextTick(() =>
    {
    player.EndLooting();
    });

    Otherwise just player.EndLooting();
     
  3. Where do you find stuff like that? I know where to find hooks and stuff.
     
  4. Wulf

    Wulf Community Admin

    NextTick is from Oxide, player.EndLooting is from the game's Assembly-CSharp.dll.
     
  5. Oh, so I would look through that?
     
  6. Wulf

    Wulf Community Admin

    For Rust stuff yes. You can use a .NET decompiler like JustDecompile, dotPeek, IL Spy, etc.
     
  7. Okay thanks.

    Did someone make a list somewhere? I'd think there would be one by now.
     
  8. Wulf

    Wulf Community Admin

    The list is in the DLL. ;)

    It'd take quite a bit of work to document the entire game.
     
  9. That is a good point, and as to what you said about random messages, somebody made a random number API I believe, I'm finding it to be very easily achievable.
     
  10. Wulf

    Wulf Community Admin

    The C# language has random functionality, you don't need an "API" for that.
     
  11. Indeed. I believe there is a betting plugin somewhere in oxide that could give you a example. Or searching the dev forum could work.
     
  12. I'm so smart.
    [DOUBLEPOST=1467780839][/DOUBLEPOST]
    I'm looking for it, is it for rust?
    [DOUBLEPOST=1467781313][/DOUBLEPOST]Looked through all the plugins, didn't seem to be any.
     
  13. Check the development category. With the search term of random or something along those lines.
     
  14. Pretty much nothing.
    @Wulf, you were refering to
    Code:
    Random random = new Random();
    int randomNumber = random.Next(0, 10);
    
    right?
     
  15. Wulf

    Wulf Community Admin

    That's one way yes.
     
  16. Is there a better way you recommend?
     
  17. Code:
    UnityEngine.Random.Range(0, 10);
    Heres another way:
     
  18. Thanks, that is a lot shorter.
     
  19. Can't find anything,
    Code:
    using System.Reflection;
    using System.Runtime.CompilerServices;
    using System.Security.Permissions;[assembly: AssemblyVersion("0.0.0.0")]
    [assembly: PermissionSet(SecurityAction.RequestMinimum, XML="<PermissionSet class=\"System.Security.PermissionSet\"\nversion=\"1\">\n<IPermission class=\"System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\"\nversion=\"1\"\nFlags=\"SkipVerification\"/>\n</PermissionSet>\n")]
    [assembly: RuntimeCompatibility(WrapNonExceptionThrows=true)]
    
    That is the whole file.
     
  20. Make sure your deconping the Assembly.CSharp