1. Rusty

    Rusty Shack Builder

    Is there an easy/efficient way of getting BasePlayer info when all you have is their 7656xxxxxxxxxxx SteamID?

    CSharp.

    Thanks!
     
  2. Wulf

    Wulf Community Admin Community Admin Oxide Developer

    Using Rust's code:
    Code (Text):
    var player = BasePlayer.FindByID(ulong userId);
    Using Oxide's core:
    Code (Text):
    var player = RustCore.FindPlayerById(string userId);
    Using Oxide's Covalence API:
    Code (Text):
    var basePlayer = players.FindPlayerById(string userId)?.Object as BasePlayer;
     
     
  3. Rusty

    Rusty Shack Builder

    Boss. Thx.
     
  4. robputt796

    robputt796 Naked Wanderer

    More to the point, and a n00b question here, but what does the internals of BasePlayer look like, I am writing my first plugin (well actually a patch for NoEscape plugin to be precise) and I wanted to extract the players SteamID, but I have no idea what BasePlayer objects look like.
     
  5. Wulf

    Wulf Community Admin Community Admin Oxide Developer

    Open up Rust's Assembly-CSharp.dll using a .NET decompiler such as JustDecompile, ILSpy, etc.
     
  6. robputt796

    robputt796 Naked Wanderer

    Alright I'll give this a go when I am back at my Windows box tommorow...
     
  7. Wulf

    Wulf Community Admin Community Admin Oxide Developer

    There are programs that run on Mac and Linux I'm sure. ;)
     
  8. robputt796

    robputt796 Naked Wanderer

    Mono *shudders*, that won't be going on my Mac any time soon. It's all good I have other headaches to deal with concerning Steam OpenID for this evening :)