1. Forgive me if there is something little I'm missing but I'm very new to Oxide and writing in C# as a whole. I'm trying to create a plugin using the Web Requests from CovalencePlugin but the player.Nickname does not work, I also tried player.userId and player.displayName but they seem to only be available in a Base Player but I'm not sure what that means.

    I would greatly appreciate any help in getting my code to receive the nickname or steam ID.


    Code:
    // Reference: Rust.Global
    using System.Collections.Generic;
    using Oxide.Core.Plugins;
    using UnityEngine;
    using Rust;
    using Oxide.Core.Libraries.Covalence;namespace Oxide.Plugins {
        [Info("DoomTownAPI", "wski", 1.0)]
        [Description("Interface with the DoomTownAPI from within Rust.")]    class DoomTownAPI : CovalencePlugin {
            [Command("sync")]
            void GetRequest(IPlayer player, string command, string[] args)
            {
                Puts(player.userID.ToString());
                if (args.Length == 1) {
                    switch (args[0]) {
                        case "help":
                            player.Reply("Use the following to sync your account with DoomTown");
                            player.Reply("/redeem");
                            break;                    default:
                            player.Reply("Attempting to sync account, standby...");
                            player.Reply(player.Object.displayName);
                            break;
                    }
                } else {
                    player.Reply("Use the following to sync your account with DoomTown");
                    player.Reply("/sync");
                }
            }        void GetCallback(int code, string response, IPlayer player) {
                if (response == null) {
                    player.Reply("Something went wrong redeeming the code, try again in a minute or two.");
                    return;
                }            player.Reply($"Successfully redeemed code! {response}");
            }
        }
    };
    
    The example I'm trying to use that seems to be broken can be found here: Oxide API for Rust

    Or here
    Docs/web_requests.md at master · OxideMod/Docs · GitHub
     
  2. Player ID: player.Id
    Player Nick/Display: player.Name.Sanitize()

    Got this from other global plugins I found.
    [DOUBLEPOST=1482480331][/DOUBLEPOST]Or just player.Name should work.
     
  3. Sweet, do you know if there is an example for getting the SteamID?
     
  4. var steamid = player.Id.ToString(); | If you dont want it as a string do | player.Id
     
  5. Awesome thanks man!