private void OnPlayerRespawn(UnturnedPlayer _player, Vector3 _position, byte _angle) { tmpComponent = _player.GetComponent <CombatLogPlayerComponent>(); tmpComponent.Init(this.Configuration.Instance.CombatLogGracePeriod, this.Configuration.Instance.WarningMessageColor, this.Configuration.Instance.ReminderNotifications, this.Configuration.Instance.ReminderNotificationInterval); }
/** * Show the combat logger punish message to the player and remove them from the combat loggers list. */ private void ProcessReturningCombatLogger(CSteamID _playerID) { tmpComponent = UnturnedPlayer.FromCSteamID(_playerID).GetComponent <CombatLogPlayerComponent>(); ShowCombatLoggerPunishToPlayer(UnturnedPlayer.FromCSteamID(_playerID)); RemovePlayerFromCombatLoggersList(_playerID); tmpComponent.Init(this.Configuration.Instance.CombatLogGracePeriod, this.Configuration.Instance.WarningMessageColor, this.Configuration.Instance.ReminderNotifications, this.Configuration.Instance.ReminderNotificationInterval); }
private void OnPlayerConnected(UnturnedPlayer _player) { tmpComponent = _player.GetComponent <CombatLogPlayerComponent>(); if (combatLoggers.Contains(_player.CSteamID)) { ProcessReturningCombatLogger(_player.CSteamID); } else { tmpComponent.Init(this.Configuration.Instance.CombatLogGracePeriod, this.Configuration.Instance.WarningMessageColor, this.Configuration.Instance.ReminderNotifications, this.Configuration.Instance.ReminderNotificationInterval); } }