Пример #1
0
        /// <summary>
        /// Removes the role from a specific player.
        /// </summary>
        /// <param name="player">The <see cref="Player"/> to remove the role from.</param>
        public virtual void RemoveRole(Player player)
        {
            TrackedPlayers.Remove(player);
            if (RemovalKillsPlayer)
            {
                player.Role = RoleType.Spectator;
            }
            foreach (CustomAbility ability in CustomAbilities)
            {
                ability.RemoveAbility(player);
            }

            RoleRemoved(player);
        }
Пример #2
0
 private void OnPlayerDisconnected(BasePlayer player, string reason) => TrackedPlayers.Remove(player.userID);