C#:
using System.Linq;
using Oxide.Core.Plugins;
using System.Globalization;
using Newtonsoft.Json.Linq;
using Oxide.Game.Rust.Cui;
using System.Collections.Generic;
using System;
using Newtonsoft.Json;
using UnityEngine;
namespace Oxide.Plugins {
[Info("XRaidProtection", "Monster", "1.1.5")]
class XRaidProtection : RustPlugin {
private void Unload() {
foreach(var player in BasePlayer.activePlayerList) {
CuiHelper.DestroyUi(player, ".MessagePanel");
CuiHelper.DestroyUi(player, ".Icon1");
CuiHelper.DestroyUi(player, ".Icon2");
CuiHelper.DestroyUi(player, ".MessagePanelX");
CuiHelper.DestroyUi(player, ".Icon1X");
CuiHelper.DestroyUi(player, ".Icon2X");
}
}
protected override void LoadDefaultConfig() => config = RaidConfig.GetNewConfiguration();
[ChatCommand("protect")]
void cmdProtection(BasePlayer player) {
if(config.Setting.TypeProtection != 0) if(_time) {
if(config.Setting.PDay && config.Setting.PDayO) Player.Reply(player, string.Format(lang.GetMessage("WIPE_CHAT_MESSAGE", this, player.UserIDString), config.Setting.PDays, $"{config.Setting.Damage * 100}") + string.Format(lang.GetMessage("LEFT", this, player.UserIDString), (config.MSCTime - DateTime.ParseExact(config.DateWipe, "dd/MM/yyyy", CultureInfo.InvariantCulture).AddDays(config.Setting.PDays)).ToString("dd' d.'hh':'mm':'ss")));
else Player.Reply(player, lang.GetMessage("P_YES_ACTIVE", this, player.UserIDString));
}
else Player.Reply(player, lang.GetMessage("P_NO_ACTIVE", this, player.UserIDString));
}
TimeSpan On, Off;
protected override void LoadConfig() {
base.LoadConfig();
try {
config = Config.ReadObject<RaidConfig>();
}
catch {
PrintWarning("Ошибка чтения конфигурации! Создание дефолтной конфигурации!");
LoadDefaultConfig();
}
SaveConfig();
}
protected override void SaveConfig() => Config.WriteObject(config);
private void OnEntityTakeDamage(BaseCombatEntity entity, HitInfo info) {
if(entity == null || info == null || info.damageTypes.Has(Rust.DamageType.Decay)) return;
if(config.Setting.TypeProtection == 0 || config.Setting.TypeProtection == 2) foreach(var perm in config.Permisssion) if(permission.UserHasPermission(entity.OwnerID.ToString(), perm.Key)) {
Protection(entity, info, perm.Value);
return;
}
if(config.Setting.TypeProtection == 1 || config.Setting.TypeProtection == 2) Protection(entity, info, config.Setting.Damage);
}
private void MSC() {
if(config.Time.LocalTime) {
config.MSCTime = DateTime.Now;
SaveConfig();
}
else webrequest.Enqueue("http://worldtimeapi.org/api/timezone/Europe/London", null, (code, response) => {
if(code != 200 || response == null) return;
config.MSCTime = new DateTime(1970, 1, 1, 0, 0, 0, 0).AddSeconds(double.Parse(JsonConvert.DeserializeObject<JObject>(response)["unixtime"].ToString()) + (config.Time.GMT * 3600));
SaveConfig();
}
, this);
timer.Once(3, () => {
bool time_1 = _time;
_time = Time();
if(!time_1 && _time) {
foreach(var player in BasePlayer.activePlayerList) {
OnPlayerConnected(player);
Player.Reply(player, lang.GetMessage("P_ACTIVE", this, player.UserIDString));
}
}
if(time_1 && !_time) {
foreach(var player in BasePlayer.activePlayerList) Player.Reply(player, lang.GetMessage("P_DEACTIVE", this, player.UserIDString));
if(!config.GUI.DeactiveUI) Unload();
else BasePlayer.activePlayerList.ToList().ForEach(OnPlayerConnected);
}
}
);
}
[PluginReference]
private Plugin IQChat;
private RaidConfig config;
private bool IsRange() {
var Now = config.MSCTime.TimeOfDay;
if(On < Off) return On <= Now && Now <= Off;
return !(Off < Now && Now < On);
}
private void OnServerInitialized() {
PrintWarning("\n-----------------------------\n" + " Author - Monster\n" + " VK - vk.com/idannopol\n" + " Discord - Monster#4837\n" + " Config - v.3233\n" + "-----------------------------");
foreach(var perm in config.Permisssion) permission.RegisterPermission(perm.Key, this);
On = new TimeSpan(config.Time.HourStart, config.Time.MinuteStart, 0);
Off = new TimeSpan(config.Time.HourEnd, config.Time.MinuteEnd, 0);
timer.Once(5, () => BasePlayer.activePlayerList.ToList().ForEach(OnPlayerConnected));
MSC();
InitializeLang();
timer.Once(1, () => {
config.DateWipe = SaveRestore.SaveCreatedTime.ToString("dd/MM/yyyy");
SaveConfig();
}
);
timer.Every(config.Time.Timer, () => MSC());
}
bool _time;
private Dictionary<BasePlayer, DateTime> Cooldowns = new Dictionary<BasePlayer, DateTime>();
private class RaidConfig {
internal class MessageSetting {
[JsonProperty("Интервал между сообщениями.Мин - 10 сек")]
public int TimeMessage;
}
[JsonProperty("Настройка времени действия защиты")]
public TimeSetting Time = new TimeSetting();
internal class TimeSetting {
[JsonProperty("Начало защиты | Часы")]
public int HourStart;
[JsonProperty("Начало защиты | Минуты")]
public int MinuteStart;
[JsonProperty("Конец защиты | Часы")]
public int HourEnd;
[JsonProperty("Конец защиты | Минуты")]
public int MinuteEnd;
[JsonProperty("Часовой пояс - UTC+0:00")]
public int GMT;
[JsonProperty("Время таймера проверки активности защиты (.сек)")]
public int Timer;
[JsonProperty("Использовать локальное время компьютера/хостинга.[ Запросы к внешнему сервису точного времени и часовой пояс будут отключены ]")]
public bool LocalTime;
}
[JsonProperty("Список префабов которые будут под защитой")]
public List<string> Prefabs = new List<string>();
internal class Settings {
[JsonProperty("Звуковой эффект")]
public string Effect;
[JsonProperty("Процент защиты для всех игроков.1.0 - 100%")]
public float Damage;
[JsonProperty("Включить звуковой эффект")]
public bool TEffect;
[JsonProperty("Активность защиты только в первые дни вайпа")]
public bool PDay;
[JsonProperty("Как будет работать защита в первые дни вайпа - [ True - круглые сутки | False - только в указанном временном диапазоне ]")]
public bool PDayO;
[JsonProperty("Сколько первых дней после вайпа будет активной защита")]
public int PDays;
[JsonProperty("Включить GUI сообщение")]
public bool TGUIMessage;
[JsonProperty("Включить чат сообщение")]
public bool TMessage;
[JsonProperty("Разрешить ломать солому во время защиты")]
public bool Twigs;
[JsonProperty("Включить защиту от урона вертолета, МЛРС, подводных лодок и т.д.[ Кроме урона от гниения ]")]
public bool MoreDamage;
[JsonProperty("0 - Защита только для игроков с пермишеном, 1 - Защита для всех игроков, 2 - Защита для игроков с пермишеном и для всех игроков")]
public int TypeProtection;
[JsonProperty("В какие дни недели защита может быть активной - [ Не распространяется на защиту в первые дни вайпа ] - [ Вс - 1, Пн - 2, Вт - 3, Ср - 4, Чт - 5, Пт - 6, Сб - 7 ]")]
public int[] DayOfWeekProtection = new int[] {
1, 2, 3, 4, 5, 6, 7
}
;
}
[JsonProperty("Общее")]
public Settings Setting = new Settings();
[JsonProperty("Время")]
public DateTime MSCTime;
internal class GUISettings {
[JsonProperty("AnchorMin [ Когда наносится урон ]")]
public string AnchorMinD;
[JsonProperty("AnchorMax [ Когда наносится урон ]")]
public string AnchorMaxD;
[JsonProperty("OffsetMin [ Когда наносится урон ]")]
public string OffsetMinD;
[JsonProperty("OffsetMax [ Когда наносится урон ]")]
public string OffsetMaxD;
[JsonProperty("Использовать иконки [ Когда наносится урон ]")]
public bool IconD;
[JsonProperty("AnchorMin [ Статус всегда отображается ]")]
public string AnchorMinA;
[JsonProperty("AnchorMax [ Статус всегда отображается ]")]
public string AnchorMaxA;
[JsonProperty("OffsetMin [ Статус всегда отображается ]")]
public string OffsetMinA;
[JsonProperty("OffsetMax [ Статус всегда отображается ]")]
public string OffsetMaxA;
[JsonProperty("Использовать иконки [ Статус всегда отображается ]")]
public bool IconA;
[JsonProperty("Цвет текста")]
public string ColorText;
[JsonProperty("Размер текста")]
public int SizeText;
[JsonProperty("Постоянно отображать UI при активной защите")]
public bool ActiveUI;
[JsonProperty("Постоянно отображать UI при неактивной защите")]
public bool DeactiveUI;
}
[JsonProperty("Сообщения в чат и GUI")]
public MessageSetting Message = new MessageSetting();
[JsonProperty("Настройка пермишенов - [ Пермишен | Процент защиты по пермишену.1.0 - 100% ]")]
public Dictionary<string, float> Permisssion = new Dictionary<string, float>();
[JsonProperty("Дата вайпа")]
public string DateWipe;
[JsonProperty("Настройка GUI")]
public GUISettings GUI = new GUISettings();
public static RaidConfig GetNewConfiguration() {
return new RaidConfig {
Message = new MessageSetting {
TimeMessage = 30
}
, Time = new TimeSetting {
HourStart = 22, MinuteStart = 0, HourEnd = 7, MinuteEnd = 0, GMT = 3, Timer = 120, LocalTime = true
}
, Setting = new Settings {
Effect = "assets/bundled/prefabs/fx/invite_notice.prefab", Damage = 0.5f, TEffect = true, PDay = false, PDayO = false, PDays = 3, TGUIMessage = true, TMessage = false, Twigs = true, MoreDamage = true, TypeProtection = 1, DayOfWeekProtection = new int[] {
1, 2, 3, 4, 5, 6, 7
}
}
, GUI = new GUISettings {
AnchorMinD = "0.5 0", AnchorMaxD = "0.5 0", OffsetMinD = "-194.5 80", OffsetMaxD = "175.5 110", IconD = true, AnchorMinA = "0.5 0", AnchorMaxA = "0.5 0", OffsetMinA = "-194.5 -6", OffsetMaxA = "175.5 24", IconA = false, ColorText = "1 1 1 0.4", SizeText = 12, ActiveUI = true, DeactiveUI = true
}
, Prefabs = new List<string> {
"cupboard.tool.deployed", "wall.frame.shopfront.metal"
}
, Permisssion = new Dictionary<string, float> {
["xraidprotection.elite"]
= 0.90f, ["xraidprotection.perm"] = 0.80f, ["xraidprotection.vip"] = 0.70f
}
}
;
}
}
private void Protection(BaseCombatEntity entity, HitInfo info, float damage) {
if(_time) {
bool ent = entity is BuildingBlock;
if(config.Setting.Twigs && ent) if((entity as BuildingBlock).grade == BuildingGrade.Enum.Twigs) return;
if(ent || entity is Door || entity is SimpleBuildingBlock || config.Prefabs.Contains(entity.ShortPrefabName)) {
BasePlayer player = info.InitiatorPlayer;
var dm = info.damageTypes.Total();
if(config.Setting.MoreDamage && player == null || player != null) info.damageTypes.ScaleAll(1.0f - damage);
if(dm >= 1.5 && player != null) {
if(Cooldowns.ContainsKey(player)) if(Cooldowns[player].Subtract(DateTime.Now).TotalSeconds >= 0) return;
string s_damage = $"{damage * 100}";
if(config.Setting.TEffect) EffectNetwork.Send(new Effect(config.Setting.Effect, player, 0, new Vector3(), new Vector3()), player.Connection);
if(config.Setting.TGUIMessage) Message(player, s_damage);
if(config.Setting.TMessage) {
string message = config.Setting.PDay && config.Setting.PDayO ? string.Format(lang.GetMessage("WIPE_CHAT_MESSAGE", this, player.UserIDString), config.Setting.PDays, s_damage) : s_damage == "100" ? string.Format(lang.GetMessage("FULL_CHAT_MESSAGE", this, player.UserIDString), s_damage, Off.ToString(@"hh\:mm"), On.ToString(@"hh\:mm")) : string.Format(lang.GetMessage("CHAT_MESSAGE", this, player.UserIDString), s_damage, On.ToString(@"hh\:mm"), Off.ToString(@"hh\:mm"));
if(IQChat) IQChatPuts(player, message);
else SendReply(player, message);
}
if(config.Message.TimeMessage < 10) Cooldowns[player] = DateTime.Now.AddSeconds(10);
else Cooldowns[player] = DateTime.Now.AddSeconds(config.Message.TimeMessage);
}
}
}
}
private void Message(BasePlayer player, string s_damage, bool destroy = true) {
CuiElementContainer container = new CuiElementContainer();
if(destroy) {
CuiHelper.DestroyUi(player, ".MessagePanel");
container.Add(new CuiLabel {
FadeOut = 0.75f, RectTransform = {
AnchorMin = config.GUI.AnchorMinD, AnchorMax = config.GUI.AnchorMaxD, OffsetMin = config.GUI.OffsetMinD, OffsetMax = config.GUI.OffsetMaxD
}
, Text = {
FadeIn = 0.75f, Text = config.Setting.PDay && config.Setting.PDayO ? string.Format(lang.GetMessage("WIPE_UI_MESSAGE", this, player.UserIDString), config.Setting.PDays, s_damage) : s_damage == "100" ? string.Format(lang.GetMessage("FULL_UI_MESSAGE", this, player.UserIDString), s_damage, Off.ToString(@"hh\:mm"), On.ToString(@"hh\:mm")) : string.Format(lang.GetMessage("UI_MESSAGE", this, player.UserIDString), s_damage, On.ToString(@"hh\:mm"), Off.ToString(@"hh\:mm")), Align = TextAnchor.MiddleCenter, Font = "robotocondensed-regular.ttf", FontSize = config.GUI.SizeText, Color = config.GUI.ColorText
}
}
, "Hud", ".MessagePanel");
if(config.GUI.IconD) {
container.Add(new CuiButton {
FadeOut = 0.75f, RectTransform = {
AnchorMin = "0.5 0", AnchorMax = "0.5 0", OffsetMin = "-180 2", OffsetMax = "-154 28"
}
, Button = {
Color = "0.8003233 0.5003233 0.5003233 0.8", Sprite = "assets/icons/vote_down.png"
}
, Text = {
Text = ""
}
}
, ".MessagePanel", ".Icon1");
container.Add(new CuiButton {
FadeOut = 0.75f, RectTransform = {
AnchorMin = "0.5 0", AnchorMax = "0.5 0", OffsetMin = "154 2", OffsetMax = "180 28"
}
, Button = {
Color = "0.8003233 0.5003233 0.5003233 0.8", Sprite = "assets/icons/vote_down.png"
}
, Text = {
Text = ""
}
}
, ".MessagePanel", ".Icon2");
}
}
else {
CuiHelper.DestroyUi(player, ".MessagePanelX");
container.Add(new CuiLabel {
FadeOut = 0.75f, RectTransform = {
AnchorMin = config.GUI.AnchorMinA, AnchorMax = config.GUI.AnchorMaxA, OffsetMin = config.GUI.OffsetMinA, OffsetMax = config.GUI.OffsetMaxA
}
, Text = {
FadeIn = 0.75f, Text = _time ? lang.GetMessage("P_YES_ACTIVE", this, player.UserIDString) : lang.GetMessage("P_NO_ACTIVE", this, player.UserIDString), Align = TextAnchor.MiddleCenter, Font = "robotocondensed-regular.ttf", FontSize = config.GUI.SizeText, Color = config.GUI.ColorText
}
}
, "Hud", ".MessagePanelX");
if(config.GUI.IconA) {
container.Add(new CuiButton {
FadeOut = 0.75f, RectTransform = {
AnchorMin = "0.5 0", AnchorMax = "0.5 0", OffsetMin = "-180 2", OffsetMax = "-154 28"
}
, Button = {
Color = "0.8003233 0.5003233 0.5003233 0.8", Sprite = "assets/icons/vote_down.png"
}
, Text = {
Text = ""
}
}
, ".MessagePanelX", ".Icon1X");
container.Add(new CuiButton {
FadeOut = 0.75f, RectTransform = {
AnchorMin = "0.5 0", AnchorMax = "0.5 0", OffsetMin = "154 2", OffsetMax = "180 28"
}
, Button = {
Color = "0.8003233 0.5003233 0.5003233 0.8", Sprite = "assets/icons/vote_down.png"
}
, Text = {
Text = ""
}
}
, ".MessagePanelX", ".Icon2X");
}
}
CuiHelper.AddUi(player, container);
if(destroy) timer.Once(7.5f, () => {
CuiHelper.DestroyUi(player, ".MessagePanel");
CuiHelper.DestroyUi(player, ".Icon1");
CuiHelper.DestroyUi(player, ".Icon2");
}
);
}
private void IQChatPuts(BasePlayer player, string Message) => IQChat?.Call("API_ALERT_PLAYER", player, Message);
private bool Time() {
if(config.Setting.PDay) {
DateTime days = config.MSCTime - DateTime.ParseExact(config.DateWipe, "dd/MM/yyyy", CultureInfo.InvariantCulture).Subtract(new DateTime(1970, 1, 1));
int d = days.Subtract(new DateTime(1970, 1, 1)).Days;
if(config.Setting.PDayO) return config.Setting.PDays > d;
else return config.Setting.PDays > d && IsRange();
}
else if(config.Setting.DayOfWeekProtection.Contains((int)config.MSCTime.DayOfWeek + 1)) return IsRange();
else return false;
}
private void InitializeLang() {
lang.RegisterMessages(new Dictionary<string, string> {
["UI_MESSAGE"]
= "NIGHT RAIDING PROTECTION ACTIVE: {0}%.FROM {1} TO {2}!", ["CHAT_MESSAGE"] = "<size=12>NIGHT RAIDING PROTECTION ACTIVE: {0}%.FROM {1} TO {2}!</size>", ["FULL_UI_MESSAGE"] = "PROTECTION: {0}%.RAIDING IS ALLOWED FROM {1} TO {2}!", ["FULL_CHAT_MESSAGE"] = "<size=12>PROTECTION: {0}%.RAIDING IS ALLOWED FROM {1} TO {2}!</size>", ["WIPE_UI_MESSAGE"] = "IN THE FIRST {0} WIPE DAYS PROTECTION IN ACTIVITY! {1}%", ["WIPE_CHAT_MESSAGE"] = "<size=12>IN THE FIRST {0} WIPE DAYS PROTECTION IN ACTIVITY! {1}%</size>", ["P_ACTIVE"] = "<color=#f74d4d90>NIGHT RAID PROTECTION IS ACTIVATED!</color>", ["P_DEACTIVE"] = "<color=#4ad44890>NIGHT RAID PROTECTION IS DEACTIVATED!</color>", ["P_NO_ACTIVE"] = "NIGHT RAID PROTECTION IS NOT ACTIVE NOW!", ["P_YES_ACTIVE"] = "NIGHT RAID PROTECTION IS NOW ACTIVE!", ["LEFT"] = "\n<size=10>LEFT: {0}</size>"
}
, this);
lang.RegisterMessages(new Dictionary<string, string> {
["UI_MESSAGE"]
= "АКТИВНА НОЧНАЯ ЗАЩИТА ОТ РЕЙДА: {0}%.С {1} ДО {2}!", ["CHAT_MESSAGE"] = "<size=12>АКТИВНА НОЧНАЯ ЗАЩИТА ОТ РЕЙДА: {0}%.С {1} ДО {2}!</size>", ["FULL_UI_MESSAGE"] = "ЗАЩИТА: {0}%.РЕЙДИТЬ РАЗРЕШЕНО С {1} ДО {2}!", ["FULL_CHAT_MESSAGE"] = "<size=12>ЗАЩИТА: {0}%.РЕЙДИТЬ РАЗРЕШЕНО С {1} ДО {2}!</size>", ["WIPE_UI_MESSAGE"] = "В ПЕРВЫЕ {0} ДНЯ ВАЙПА ДЕЙСТВУЕТ ЗАЩИТА! {1}%", ["WIPE_CHAT_MESSAGE"] = "<size=12>В ПЕРВЫЕ {0} ДНЯ ВАЙПА ДЕЙСТВУЕТ ЗАЩИТА! {1}%</size>", ["P_ACTIVE"] = "<color=#f74d4d90>НОЧНАЯ ЗАЩИТА ОТ РЕЙДА АКТИВИРОВАНА!</color>", ["P_DEACTIVE"] = "<color=#4ad44890>НОЧНАЯ ЗАЩИТА ОТ РЕЙДА ДЕАКТИВИРОВАНА!</color>", ["P_NO_ACTIVE"] = "НОЧНАЯ ЗАЩИТА ОТ РЕЙДА СЕЙЧАС НЕ АКТИВНА!", ["P_YES_ACTIVE"] = "НОЧНАЯ ЗАЩИТА ОТ РЕЙДА СЕЙЧАС АКТИВНА!", ["LEFT"] = "\n<size=10>ОСТАЛОСЬ: {0}</size>"
}
, this, "ru");
lang.RegisterMessages(new Dictionary<string, string> {
["UI_MESSAGE"]
= "АКТИВНИЙ НІЧНИЙ ЗАХИСТ ВІД РЕЙДУ: {0}%.З {1} ДО {2}!", ["CHAT_MESSAGE"] = "<size=12>АКТИВНИЙ НІЧНИЙ ЗАХИСТ ВІД РЕЙДУ: {0}%.З {1} ДО {2}!</size>", ["FULL_UI_MESSAGE"] = "ЗАХИСТ: {0}%.РЕЙДИТИ ДОЗВОЛЕНО З {1} ДО {2}!", ["FULL_CHAT_MESSAGE"] = "<size=12>ЗАХИСТ: {0}%.РЕЙДИТИ ДОЗВОЛЕНО З {1} ДО {2}!</size>", ["WIPE_UI_MESSAGE"] = "У ПЕРШІ {0} ДНЯ ВАЙПУ ДІЄ ЗАХИСТ! {1}%", ["WIPE_CHAT_MESSAGE"] = "<size=12>У ПЕРШІ {0} ДНЯ ВАЙПУ ДІЄ ЗАХИСТ! {1}%</size>", ["P_ACTIVE"] = "<color=#f74d4d90>НІЧНИЙ ЗАХИСТ ВІД РЕЙДУ АКТИВОВАНИЙ!</color>", ["P_DEACTIVE"] = "<color=#4ad44890>НІЧНИЙ ЗАХИСТ ВІД РЕЙДУ ДЕАКТИВОВАНИЙ!</color>", ["P_NO_ACTIVE"] = "НІЧНИЙ ЗАХИСТ ВІД РЕЙДУ ЗАРАЗ НЕ АКТИВНИЙ!", ["P_YES_ACTIVE"] = "НІЧНИЙ ЗАХИСТ ВІД РЕЙДУ ЗАРАЗ АКТИВНИЙ!", ["LEFT"] = "\n<size=10>ЗАЛИШИЛОСЯ: {0}</size>"
}
, this, "uk");
lang.RegisterMessages(new Dictionary<string, string> {
["UI_MESSAGE"]
= "PROTECCIÓN CONTRA ATAQUES NOCTURNOS ACTIVADA: {0}%.DE {1} A {2}!", ["CHAT_MESSAGE"] = "<size=12>PROTECCIÓN CONTRA ATAQUES NOCTURNOS ACTIVADA: {0}%.DE {1} A {2}!</size>", ["FULL_UI_MESSAGE"] = "PROTECCIÓN: {0}%.SE PERMITE ASALTAR DE {1} A {2}!", ["FULL_CHAT_MESSAGE"] = "<size=12>PROTECCIÓN: {0}%.SE PERMITE ASALTAR DE {1} A {2}!</size>", ["WIPE_UI_MESSAGE"] = "EN LOS PRIMEROS {0} DÍAS LIMPIEZA ¡PROTECCIÓN EN ACTIVIDAD! {1}%", ["WIPE_CHAT_MESSAGE"] = "<size=12>EN LOS PRIMEROS {0} DÍAS LIMPIEZA ¡PROTECCIÓN EN ACTIVIDAD! {1}%</size>", ["P_ACTIVE"] = "<color=#f74d4d90>¡LA PROTECCIÓN CONTRA RAID NOCTURNO ESTÁ ACTIVADA!</color>", ["P_DEACTIVE"] = "<color=#4ad44890>¡LA PROTECCIÓN CONTRA RAID NOCTURNO ESTÁ DESACTIVADA!</color>", ["P_NO_ACTIVE"] = "<size=10>¡LA PROTECCIÓN CONTRA RAID NOCTURNO NO ESTÁ ACTIVADA AHORA!</size>", ["P_YES_ACTIVE"] = "¡LA PROTECCIÓN CONTRA RAID NOCTURNO YA ESTÁ ACTIVA!", ["LEFT"] = "\n<size=10>IZQUIERDA: {0}</size>"
}
, this, "es-ES");
}
private void OnPlayerConnected(BasePlayer player) {
if(player.IsReceivingSnapshot) {
NextTick(() => OnPlayerConnected(player));
return;
}
if(config.GUI.ActiveUI && _time || config.GUI.DeactiveUI && !_time) Message(player, "", false);
}
}
}