Exemple #1
0
        public override void OnEnable()
        {
            if (!Config.GetBool(kCfgPrefix + "enable", true))
            {
                return;
            }

            ActiveRoles = Config.GetStringList(kCfgPrefix + "activegroups").ToArray();

            RainbowTagController.interval = Config.GetFloat(kCfgPrefix + "taginterval", 0.5f);

            if (Config.GetBool(kCfgPrefix + "usecustomsequence"))
            {
                RainbowTagController.Colors = Config.GetStringList(kCfgPrefix + "colorsequence").ToArray();
            }

            Events.PlayerJoinEvent += OnPlayerJoinEvent;

            foreach (var player in PlayerManager.players)
            {
                ReferenceHub hub = player.GetPlayer();

                if (!hub.IsRainbowTagUser())
                {
                    continue;
                }

                AddRainbowController(hub);
            }
        }