public void OnSetRole(PlayerSetRoleEvent ev)
        {
            ev.Items.AddRange(GetPatronItems(ev.Player, ev.TeamRole));

            foreach (Patron patron in PatreonPlugin.GetPatrons())
            {
                if (patron.SteamId != ev.Player.SteamId || !patron.AutoRefresh)
                {
                    continue;
                }

                PlayerJoinHandler.SetPatronRoles(ev.Player);
                break;
            }
        }
        public static string RefreshPatrons()
        {
            PlayerJoinHandler.SetPatronRoles(PatreonPlugin.Players);

            return(Successes.RefreshPatron);
        }
Exemple #3
0
        public string RefreshPatrons()
        {
            PlayerJoinHandler.SetPatronRoles(ServerMod2.API.SmodPlayer.GetPlayers().ToArray());

            return(Successes.RefreshPatron);
        }