Ejemplo n.º 1
0
        /// <summary> Attempts to change the color of the target player </summary>
        public static bool SetColor(Player p, string target, string name)
        {
            string color = "";
            Player who   = PlayerInfo.FindExact(target);

            if (name.Length == 0)
            {
                color = Group.GroupIn(target).Color;

                PlayerDB.Update(target, PlayerData.ColumnColor, "");
                MessageAction(p, target, who, "λACTOR &Sremoved λTARGET color");
            }
            else
            {
                color = Matcher.FindColor(p, name);
                if (color == null)
                {
                    return(false);
                }

                PlayerDB.Update(target, PlayerData.ColumnColor, color);
                MessageAction(p, target, who, "λACTOR &Schanged λTARGET color to " + color + Colors.Name(color));
            }
            if (who != null)
            {
                who.UpdateColor(color);
            }
            return(true);
        }
Ejemplo n.º 2
0
        /// <summary> Attempts to change the title color of the target player </summary>
        public static bool SetTitleColor(Player p, string target, string name)
        {
            string color = "";
            Player who   = PlayerInfo.FindExact(target);

            if (name.Length == 0)
            {
                MessageAction(p, target, who, "λACTOR &Sremoved λTARGET title color");
            }
            else
            {
                color = Matcher.FindColor(p, name);
                if (color == null)
                {
                    return(false);
                }

                MessageAction(p, target, who, "λACTOR &Schanged λTARGET title color to " + color + Colors.Name(color));
            }

            if (who != null)
            {
                who.titlecolor = color;
            }
            if (who != null)
            {
                who.SetPrefix();
            }
            PlayerDB.Update(target, PlayerData.ColumnTColor, color);
            return(true);
        }