});
if (player.Name.Contains("[AFK]"))
{
player.Name = player.Name.Replace("[AFK]", "");
}
player.SendInfo("Sucessfully Un-AFKed");
return true;
}
if (player.Owner.EnemiesCollision.HitTest(player.X, player.Y, 8).OfType<Enemy>().Any())
{
player.SendError("Not safe to go AFK.");
return false;
}
else
{
player.SendError("Couldn't go AFK");
return false;
}
}
}
You will also need to add this:
add this
if (player.Name.Contains("[AFK]"))
{
player.Name = player.Name.Replace("[AFK]", "");
}
to your pause command so the "[AFK]" tag disappears from your name if u use /pause if ur /afk'd.
This is a basic command and you could probably make it easier and shit but it works so its good enough for me.