The Error:
You Changed the name of
Covalence.RustPlayer[76561############, killswitch to testing
My Code:
[Command("nick")]
private void nickCommand(IPlayer player, string Command, string[] args)
{
string originalName = player.Name;
if (args.Length == 1)
{
var Nickname = args[0];
if (Nickname != null)
{
player.Rename(Nickname);
player.Reply("Named changed to " + Nickname);
}
}
else if (args.Length == 0)
{
player.Reply("You didn't specify a name!");
}
if (args.Length == 2) //This is the part below is giving me the error i think
{
string name = args[1];
var target = players.FindPlayer(args[0]);
if (target != null)
{
target.Rename(name);
player.Reply($"You Changed the name of <color=red>{target}</color> to <color=red>{name}</color>");
}
}