From d22c8916e2f9ffbfeba8b273fd660c5374e0c97c Mon Sep 17 00:00:00 2001 From: Gold KingZ <48490385+oqyh@users.noreply.github.com> Date: Tue, 30 Apr 2024 17:27:40 +0400 Subject: [PATCH] 1.0.7 --- Config/Configs.cs | 28 +- Config/Helper.cs | 13 +- Kill-Sound-GoldKingZ.cs | 2004 ++++++++++++++++++++++++++------------- lang/en.json | 19 +- 4 files changed, 1386 insertions(+), 678 deletions(-) diff --git a/Config/Configs.cs b/Config/Configs.cs index a528ecf..9ea75e6 100644 --- a/Config/Configs.cs +++ b/Config/Configs.cs @@ -89,15 +89,20 @@ public class ConfigData { public bool KS_EnableQuakeSounds { get; set; } public bool KS_DisableQuakeSoundsOnWarmUp { get; set; } + public bool KS_ResetKillStreakOnEveryRound { get; set; } public string empty { get; set; } - public string KS_HeadShotKillSoundPath { get; set; } + public bool KS_AddMenu_FreezeOnOpenMenu { get; set; } + public string KS_AddMenu_HeadShotKillSoundPath { get; set; } - public string KS_BodyKillSoundPath { get; set; } + public string KS_AddMenu_BodyKillSoundPath { get; set; } - public string KS_HeadShotHitSoundPath { get; set; } + public string KS_AddMenu_HeadShotHitSoundPath { get; set; } - public string KS_BodyHitSoundPath { get; set; } + public string KS_AddMenu_BodyHitSoundPath { get; set; } + public bool KS_AddMenu_QuakeSoundsToggle { get; set; } + public bool KS_AddMenu_QuakeCenterMessageToggle { get; set; } + public bool KS_AddMenu_QuakeChatMessageToggle { get; set; } public string empty2 { get; set; } public bool KS_FreezeOnOpenMenuDefaultValue { get; set; } @@ -114,18 +119,23 @@ public ConfigData() { KS_EnableQuakeSounds = false; KS_DisableQuakeSoundsOnWarmUp = true; + KS_ResetKillStreakOnEveryRound = true; empty = "-----------------------------------------------------------------------------------"; - KS_HeadShotKillSoundPath = "sounds/GoldKingZ/Training/bell_normal.vsnd_c"; - KS_BodyKillSoundPath = "sounds/GoldKingZ/Training/timer_bell.vsnd_c"; - KS_HeadShotHitSoundPath = "sounds/GoldKingZ/Training/bell_impact.vsnd_c"; - KS_BodyHitSoundPath = "sounds/GoldKingZ/Training/timer_bell.vsnd_c"; + KS_AddMenu_FreezeOnOpenMenu = true; + KS_AddMenu_HeadShotKillSoundPath = "sounds/GoldKingZ/Training/bell_normal.vsnd_c"; + KS_AddMenu_BodyKillSoundPath = "sounds/GoldKingZ/Training/timer_bell.vsnd_c"; + KS_AddMenu_HeadShotHitSoundPath = "sounds/GoldKingZ/Training/bell_impact.vsnd_c"; + KS_AddMenu_BodyHitSoundPath = "sounds/GoldKingZ/Training/timer_bell.vsnd_c"; + KS_AddMenu_QuakeSoundsToggle = true; + KS_AddMenu_QuakeCenterMessageToggle = true; + KS_AddMenu_QuakeChatMessageToggle = true; empty2 = "-----------------------------------------------------------------------------------"; KS_FreezeOnOpenMenuDefaultValue = true; KS_HeadShotKillSoundDefaultValue = true; KS_BodyKillSoundDefaultValue = false; KS_HeadShotHitSoundDefaultValue = false; KS_BodyHitSoundDefaultValue = false; - KS_InGameMenu = "!soundmenu,!soundsmenu,!menusound,!menusounds"; + KS_InGameMenu = "!quake,!quakesounds,!soundmenu,!soundsmenu,!menusound,!menusounds,!soundsettings,!soundsetting"; KS_OnlyAllowTheseGroupsToToggle = ""; empty3 = "-----------------------------------------------------------------------------------"; Information_For_You_Dont_Delete_it = " Vist [https://github.com/oqyh/cs2-Kill-Sound-GoldKingZ/tree/main?tab=readme-ov-file#-configuration-] To Understand All Above"; diff --git a/Config/Helper.cs b/Config/Helper.cs index 5f43a5c..f421516 100644 --- a/Config/Helper.cs +++ b/Config/Helper.cs @@ -344,7 +344,7 @@ public static void CreateDefaultWeaponsJson(string jsonFilePath) string json = System.Text.Json.JsonSerializer.Serialize(configData, options); - json = "// Note: To Use These You Need To Enable KS_EnableQuakeSounds First In config.json \n// Then Download https://github.com/Source2ZE/MultiAddonManager With Gold KingZ WorkShop \n// https://steamcommunity.com/sharedfiles/filedetails/?id=3230015783\n// mm_extra_addons 3230015783 \n\n" + json; + json = "// Note: To Use These You Need To Enable KS_EnableQuakeSounds First In config.json \n// Then Download https://github.com/Source2ZE/MultiAddonManager With Gold KingZ WorkShop \n// https://steamcommunity.com/sharedfiles/filedetails/?id=3230015783\n// mm_extra_addons 3230015783\n// You Can Find WorkShop Path Sound In https://github.com/oqyh/cs2-Kill-Sound-GoldKingZ/blob/main/sounds/Gold%20KingZ%20WorkShop%20Sounds.txt \n\n" + json; File.WriteAllText(jsonFilePath, json); } @@ -383,9 +383,12 @@ public class PersonData public bool headshothit { get; set; } public bool bodyshotkill { get; set; } public bool bodyshothit { get; set; } + public bool quakesounds { get; set; } + public bool quakehmessages { get; set; } + public bool quakecmessages { get; set; } public DateTime DateAndTime { get; set; } } - public static void SaveToJsonFile(ulong PlayerSteamID, bool freezemenu, bool headshotkill, bool headshothit, bool bodyshotkill, bool bodyshothit, DateTime DateAndTime) + public static void SaveToJsonFile(ulong PlayerSteamID, bool freezemenu, bool headshotkill, bool headshothit, bool bodyshotkill, bool bodyshothit, bool quakesounds, bool quakehmessages, bool quakecmessages, DateTime DateAndTime) { string Fpath = Path.Combine(Configs.Shared.CookiesModule!, "../../plugins/Kill-Sound-GoldKingZ/Cookies/"); string Fpathc = Path.Combine(Configs.Shared.CookiesModule!, "../../plugins/Kill-Sound-GoldKingZ/Cookies/Kill_Sound_Cookies.json"); @@ -414,6 +417,9 @@ public static void SaveToJsonFile(ulong PlayerSteamID, bool freezemenu, bool hea existingPerson.headshothit = headshothit; existingPerson.bodyshotkill = bodyshotkill; existingPerson.bodyshothit = bodyshothit; + existingPerson.quakesounds = quakesounds; + existingPerson.quakehmessages = quakehmessages; + existingPerson.quakecmessages = quakecmessages; existingPerson.DateAndTime = DateAndTime; } else @@ -425,6 +431,9 @@ public static void SaveToJsonFile(ulong PlayerSteamID, bool freezemenu, bool hea headshothit = headshothit, bodyshotkill = bodyshotkill, bodyshothit = bodyshothit, + quakesounds = quakesounds, + quakehmessages = quakehmessages, + quakecmessages = quakecmessages, DateAndTime = DateAndTime }; allPersonsData.Add(newPerson); diff --git a/Kill-Sound-GoldKingZ.cs b/Kill-Sound-GoldKingZ.cs index b4c29fa..7fb2e32 100644 --- a/Kill-Sound-GoldKingZ.cs +++ b/Kill-Sound-GoldKingZ.cs @@ -7,6 +7,8 @@ using CounterStrikeSharp.API.Modules.Memory; using Kill_Sound_GoldKingZ.Config; using CounterStrikeSharp.API.Modules.Timers; +using CounterStrikeSharp.API.Modules.Utils; + namespace Kill_Sound_GoldKingZ; @@ -15,7 +17,7 @@ namespace Kill_Sound_GoldKingZ; public class KillSoundGoldKingZ : BasePlugin { public override string ModuleName => "Kill Sound ( Kill , HeadShot , Quake )"; - public override string ModuleVersion => "1.0.6"; + public override string ModuleVersion => "1.0.7"; public override string ModuleAuthor => "Gold KingZ"; public override string ModuleDescription => "https://github.com/oqyh"; internal static IStringLocalizer? Stringlocalizer; @@ -78,7 +80,7 @@ private HookResult OnPlayerDeath(EventPlayerDeath @event, GameEventInfo info) { if(headshot) { - if (!string.IsNullOrEmpty(Configs.GetConfigData().KS_HeadShotKillSoundPath)) + if (!string.IsNullOrEmpty(Configs.GetConfigData().KS_AddMenu_HeadShotKillSoundPath)) { if(ConVar.Find("mp_teammates_are_enemies")!.GetPrimitiveValue() == false) { @@ -91,14 +93,14 @@ private HookResult OnPlayerDeath(EventPlayerDeath @event, GameEventInfo info) //skip }else { - attacker.ExecuteClientCommand("play " + Configs.GetConfigData().KS_HeadShotKillSoundPath); + attacker.ExecuteClientCommand("play " + Configs.GetConfigData().KS_AddMenu_HeadShotKillSoundPath); } }else { if (personData.headshotkill) { - attacker.ExecuteClientCommand("play " + Configs.GetConfigData().KS_HeadShotKillSoundPath); + attacker.ExecuteClientCommand("play " + Configs.GetConfigData().KS_AddMenu_HeadShotKillSoundPath); }else { //skip @@ -115,14 +117,14 @@ private HookResult OnPlayerDeath(EventPlayerDeath @event, GameEventInfo info) //skip }else { - attacker.ExecuteClientCommand("play " + Configs.GetConfigData().KS_HeadShotKillSoundPath); + attacker.ExecuteClientCommand("play " + Configs.GetConfigData().KS_AddMenu_HeadShotKillSoundPath); } }else { if (personData.headshotkill) { - attacker.ExecuteClientCommand("play " + Configs.GetConfigData().KS_HeadShotKillSoundPath); + attacker.ExecuteClientCommand("play " + Configs.GetConfigData().KS_AddMenu_HeadShotKillSoundPath); }else { //skip @@ -132,7 +134,7 @@ private HookResult OnPlayerDeath(EventPlayerDeath @event, GameEventInfo info) } }else { - if (!string.IsNullOrEmpty(Configs.GetConfigData().KS_BodyKillSoundPath)) + if (!string.IsNullOrEmpty(Configs.GetConfigData().KS_AddMenu_BodyKillSoundPath)) { if(ConVar.Find("mp_teammates_are_enemies")!.GetPrimitiveValue() == false) { @@ -145,14 +147,14 @@ private HookResult OnPlayerDeath(EventPlayerDeath @event, GameEventInfo info) //skip }else { - attacker.ExecuteClientCommand("play " + Configs.GetConfigData().KS_BodyKillSoundPath); + attacker.ExecuteClientCommand("play " + Configs.GetConfigData().KS_AddMenu_BodyKillSoundPath); } }else { if (personData.bodyshotkill) { - attacker.ExecuteClientCommand("play " + Configs.GetConfigData().KS_BodyKillSoundPath); + attacker.ExecuteClientCommand("play " + Configs.GetConfigData().KS_AddMenu_BodyKillSoundPath); }else { //skip @@ -169,14 +171,14 @@ private HookResult OnPlayerDeath(EventPlayerDeath @event, GameEventInfo info) //skip }else { - attacker.ExecuteClientCommand("play " + Configs.GetConfigData().KS_BodyKillSoundPath); + attacker.ExecuteClientCommand("play " + Configs.GetConfigData().KS_AddMenu_BodyKillSoundPath); } }else { if (personData.bodyshotkill) { - attacker.ExecuteClientCommand("play " + Configs.GetConfigData().KS_BodyKillSoundPath); + attacker.ExecuteClientCommand("play " + Configs.GetConfigData().KS_AddMenu_BodyKillSoundPath); }else { //skip @@ -207,7 +209,7 @@ private HookResult OnPlayerHurt(EventPlayerHurt @event, GameEventInfo info) { if(hitgroup == 1) { - if (!string.IsNullOrEmpty(Configs.GetConfigData().KS_HeadShotHitSoundPath)) + if (!string.IsNullOrEmpty(Configs.GetConfigData().KS_AddMenu_HeadShotHitSoundPath)) { if(ConVar.Find("mp_teammates_are_enemies")!.GetPrimitiveValue() == false) { @@ -220,14 +222,14 @@ private HookResult OnPlayerHurt(EventPlayerHurt @event, GameEventInfo info) //skip }else { - attacker.ExecuteClientCommand("play " + Configs.GetConfigData().KS_HeadShotHitSoundPath); + attacker.ExecuteClientCommand("play " + Configs.GetConfigData().KS_AddMenu_HeadShotHitSoundPath); } }else { if (personData.headshothit) { - attacker.ExecuteClientCommand("play " + Configs.GetConfigData().KS_HeadShotHitSoundPath); + attacker.ExecuteClientCommand("play " + Configs.GetConfigData().KS_AddMenu_HeadShotHitSoundPath); }else { //skip @@ -245,14 +247,14 @@ private HookResult OnPlayerHurt(EventPlayerHurt @event, GameEventInfo info) //skip }else { - attacker.ExecuteClientCommand("play " + Configs.GetConfigData().KS_HeadShotHitSoundPath); + attacker.ExecuteClientCommand("play " + Configs.GetConfigData().KS_AddMenu_HeadShotHitSoundPath); } }else { if (personData.headshothit) { - attacker.ExecuteClientCommand("play " + Configs.GetConfigData().KS_HeadShotHitSoundPath); + attacker.ExecuteClientCommand("play " + Configs.GetConfigData().KS_AddMenu_HeadShotHitSoundPath); }else { //skip @@ -263,7 +265,7 @@ private HookResult OnPlayerHurt(EventPlayerHurt @event, GameEventInfo info) } }else { - if (!string.IsNullOrEmpty(Configs.GetConfigData().KS_BodyHitSoundPath)) + if (!string.IsNullOrEmpty(Configs.GetConfigData().KS_AddMenu_BodyHitSoundPath)) { if(ConVar.Find("mp_teammates_are_enemies")!.GetPrimitiveValue() == false) { @@ -276,14 +278,14 @@ private HookResult OnPlayerHurt(EventPlayerHurt @event, GameEventInfo info) //skip }else { - attacker.ExecuteClientCommand("play " + Configs.GetConfigData().KS_BodyHitSoundPath); + attacker.ExecuteClientCommand("play " + Configs.GetConfigData().KS_AddMenu_BodyHitSoundPath); } }else { if (personData.bodyshothit) { - attacker.ExecuteClientCommand("play " + Configs.GetConfigData().KS_BodyHitSoundPath); + attacker.ExecuteClientCommand("play " + Configs.GetConfigData().KS_AddMenu_BodyHitSoundPath); }else { //skip @@ -299,14 +301,14 @@ private HookResult OnPlayerHurt(EventPlayerHurt @event, GameEventInfo info) //skip }else { - attacker.ExecuteClientCommand("play " + Configs.GetConfigData().KS_BodyHitSoundPath); + attacker.ExecuteClientCommand("play " + Configs.GetConfigData().KS_AddMenu_BodyHitSoundPath); } }else { if (personData.bodyshothit) { - attacker.ExecuteClientCommand("play " + Configs.GetConfigData().KS_BodyHitSoundPath); + attacker.ExecuteClientCommand("play " + Configs.GetConfigData().KS_AddMenu_BodyHitSoundPath); }else { //skip @@ -357,29 +359,48 @@ private HookResult OnPlayerDeathQuake(EventPlayerDeath @event, GameEventInfo inf { if(players != null && players.IsValid && !players.IsBot) { - players.ExecuteClientCommand("play " + SsoundPath); - if (SShowChat && !string.IsNullOrEmpty(Localizer["chat.announce.quake.selfkill"])) + var playerid = players.SteamID; + Helper.PersonData personData = Helper.RetrievePersonDataById(playerid); + if(personData.quakesounds) + { + + }else { - Helper.AdvancedPrintToChat(players, Localizer["chat.announce.quake.selfkill"], victim.PlayerName); + players.ExecuteClientCommand("play " + SsoundPath); } + if(personData.quakecmessages) + { - if (SShowCenter && !string.IsNullOrEmpty(Localizer["center.announce.quake.selfkill"])) + }else { - Server.NextFrame(() => + if (SShowChat && !string.IsNullOrEmpty(Localizer["chat.announce.quake.selfkill"])) { - if(Globals.ShowHud_Kill.ContainsKey(players.SteamID)) - { - Globals.ShowHud_Kill.Remove(players.SteamID); - } - if(!Globals.ShowHud_Kill.ContainsKey(players.SteamID)) + Helper.AdvancedPrintToChat(players, Localizer["chat.announce.quake.selfkill"], victim.PlayerName); + } + } + if(personData.quakehmessages) + { + + }else + { + if (SShowCenter && !string.IsNullOrEmpty(Localizer["center.announce.quake.selfkill"])) + { + Server.NextFrame(() => { - Globals.ShowHud_Kill_Name = victim.PlayerName; - Globals.ShowHud_Kill.Add(players.SteamID, Localizer["center.announce.quake.selfkill"]); - } - HUDTimer?.Kill(); - HUDTimer = null; - HUDTimer = AddTimer(SIntervalHUD, HUDTimer_Callback, TimerFlags.STOP_ON_MAPCHANGE); - }); + if(Globals.ShowHud_Kill.ContainsKey(players.SteamID)) + { + Globals.ShowHud_Kill.Remove(players.SteamID); + } + if(!Globals.ShowHud_Kill.ContainsKey(players.SteamID)) + { + Globals.ShowHud_Kill_Name = victim.PlayerName; + Globals.ShowHud_Kill.Add(players.SteamID, Localizer["center.announce.quake.selfkill"]); + } + HUDTimer?.Kill(); + HUDTimer = null; + HUDTimer = AddTimer(SIntervalHUD, HUDTimer_Callback, TimerFlags.STOP_ON_MAPCHANGE); + }); + } } } @@ -387,29 +408,51 @@ private HookResult OnPlayerDeathQuake(EventPlayerDeath @event, GameEventInfo inf }else { - attacker.ExecuteClientCommand("play " + SsoundPath); - if (SShowChat && !string.IsNullOrEmpty(Localizer["chat.quake.selfkill"])) + var playerid = attacker.SteamID; + Helper.PersonData personDataA = Helper.RetrievePersonDataById(playerid); + if(personDataA.quakesounds) + { + + }else { - Helper.AdvancedPrintToChat(attacker, Localizer["chat.quake.selfkill"]); + attacker.ExecuteClientCommand("play " + SsoundPath); } - if (SShowCenter && !string.IsNullOrEmpty(Localizer["center.quake.selfkill"])) + if(personDataA.quakecmessages) { - Server.NextFrame(() => + + }else + { + if (SShowChat && !string.IsNullOrEmpty(Localizer["chat.quake.selfkill"])) { - if(Globals.ShowHud_Kill.ContainsKey(attacker.SteamID)) - { - Globals.ShowHud_Kill.Remove(attacker.SteamID); - } - if(!Globals.ShowHud_Kill.ContainsKey(attacker.SteamID)) + Helper.AdvancedPrintToChat(attacker, Localizer["chat.quake.selfkill"]); + } + } + + if(personDataA.quakehmessages) + { + + }else + { + if (SShowCenter && !string.IsNullOrEmpty(Localizer["center.quake.selfkill"])) + { + Server.NextFrame(() => { - Globals.ShowHud_Kill.Add(attacker.SteamID, Localizer[$"center.quake.selfkill"]); - } - HUDTimer?.Kill(); - HUDTimer = null; - HUDTimer = AddTimer(SIntervalHUD, HUDTimer_Callback, TimerFlags.STOP_ON_MAPCHANGE); - }); + if(Globals.ShowHud_Kill.ContainsKey(attacker.SteamID)) + { + Globals.ShowHud_Kill.Remove(attacker.SteamID); + } + if(!Globals.ShowHud_Kill.ContainsKey(attacker.SteamID)) + { + Globals.ShowHud_Kill.Add(attacker.SteamID, Localizer[$"center.quake.selfkill"]); + } + HUDTimer?.Kill(); + HUDTimer = null; + HUDTimer = AddTimer(SIntervalHUD, HUDTimer_Callback, TimerFlags.STOP_ON_MAPCHANGE); + }); + } } + } } }catch{} @@ -482,59 +525,98 @@ private HookResult OnPlayerDeathQuake(EventPlayerDeath @event, GameEventInfo inf { if(players != null && players.IsValid && !players.IsBot) { - players.ExecuteClientCommand("play " + SsoundPath); - if (SShowChat && !string.IsNullOrEmpty(Localizer["chat.announce.quake.selfkill"])) + if(personData.quakesounds) + { + + }else + { + players.ExecuteClientCommand("play " + SsoundPath); + } + if(personData.quakecmessages) { - Helper.AdvancedPrintToChat(players, Localizer["chat.announce.quake.selfkill"], victim.PlayerName); + + }else + { + if (SShowChat && !string.IsNullOrEmpty(Localizer["chat.announce.quake.selfkill"])) + { + Helper.AdvancedPrintToChat(players, Localizer["chat.announce.quake.selfkill"], victim.PlayerName); + } } + + if(personData.quakehmessages) + { - if (SShowCenter && !string.IsNullOrEmpty(Localizer["center.announce.quake.selfkill"])) + }else { - Server.NextFrame(() => + if (SShowCenter && !string.IsNullOrEmpty(Localizer["center.announce.quake.selfkill"])) { - if(Globals.ShowHud_Kill.ContainsKey(players.SteamID)) - { - Globals.ShowHud_Kill.Remove(players.SteamID); - } - if(!Globals.ShowHud_Kill.ContainsKey(players.SteamID)) + Server.NextFrame(() => { - Globals.ShowHud_Kill_Name = victim.PlayerName; - Globals.ShowHud_Kill.Add(players.SteamID, Localizer["center.announce.quake.selfkill"]); - } - HUDTimer?.Kill(); - HUDTimer = null; - HUDTimer = AddTimer(SIntervalHUD, HUDTimer_Callback, TimerFlags.STOP_ON_MAPCHANGE); - }); + if(Globals.ShowHud_Kill.ContainsKey(players.SteamID)) + { + Globals.ShowHud_Kill.Remove(players.SteamID); + } + if(!Globals.ShowHud_Kill.ContainsKey(players.SteamID)) + { + Globals.ShowHud_Kill_Name = victim.PlayerName; + Globals.ShowHud_Kill.Add(players.SteamID, Localizer["center.announce.quake.selfkill"]); + } + HUDTimer?.Kill(); + HUDTimer = null; + HUDTimer = AddTimer(SIntervalHUD, HUDTimer_Callback, TimerFlags.STOP_ON_MAPCHANGE); + }); + } } + } }); }else { - attacker.ExecuteClientCommand("play " + SsoundPath); - if (SShowChat && !string.IsNullOrEmpty(Localizer["chat.quake.selfkill"])) + if(personData.quakesounds) { - Helper.AdvancedPrintToChat(attacker, Localizer["chat.quake.selfkill"]); + + }else + { + attacker.ExecuteClientCommand("play " + SsoundPath); } - if (SShowCenter && !string.IsNullOrEmpty(Localizer["center.quake.selfkill"])) + if(personData.quakecmessages) { - Server.NextFrame(() => + + }else + { + if (SShowChat && !string.IsNullOrEmpty(Localizer["chat.quake.selfkill"])) { - if(Globals.ShowHud_Kill.ContainsKey(attacker.SteamID)) - { - Globals.ShowHud_Kill.Remove(attacker.SteamID); - } - if(!Globals.ShowHud_Kill.ContainsKey(attacker.SteamID)) + Helper.AdvancedPrintToChat(attacker, Localizer["chat.quake.selfkill"]); + } + } + + if(personData.quakehmessages) + { + + }else + { + if (SShowCenter && !string.IsNullOrEmpty(Localizer["center.quake.selfkill"])) + { + Server.NextFrame(() => { - Globals.ShowHud_Kill.Add(attacker.SteamID, Localizer[$"center.quake.selfkill"]); - } - HUDTimer?.Kill(); - HUDTimer = null; - HUDTimer = AddTimer(SIntervalHUD, HUDTimer_Callback, TimerFlags.STOP_ON_MAPCHANGE); - }); + if(Globals.ShowHud_Kill.ContainsKey(attacker.SteamID)) + { + Globals.ShowHud_Kill.Remove(attacker.SteamID); + } + if(!Globals.ShowHud_Kill.ContainsKey(attacker.SteamID)) + { + Globals.ShowHud_Kill.Add(attacker.SteamID, Localizer[$"center.quake.selfkill"]); + } + HUDTimer?.Kill(); + HUDTimer = null; + HUDTimer = AddTimer(SIntervalHUD, HUDTimer_Callback, TimerFlags.STOP_ON_MAPCHANGE); + }); + } } + } return HookResult.Continue; } @@ -610,62 +692,104 @@ private HookResult OnPlayerDeathQuake(EventPlayerDeath @event, GameEventInfo inf { if(players != null && players.IsValid && !players.IsBot) { - players.ExecuteClientCommand("play " + TsoundPath); - if (TShowChat && !string.IsNullOrEmpty(Localizer["chat.announce.quake.teamkill"])) - { - Helper.AdvancedPrintToChat(players, Localizer["chat.announce.quake.teamkill"], attacker.PlayerName, victim.PlayerName); - } - - if (TShowCenter && !string.IsNullOrEmpty(Localizer["center.announce.quake.teamkill"])) - { - Server.NextFrame(() => - { - if(Globals.ShowHud_Kill.ContainsKey(players.SteamID)) - { - Globals.ShowHud_Kill.Remove(players.SteamID); - } - if(!Globals.ShowHud_Kill.ContainsKey(players.SteamID)) - { - Globals.ShowHud_Kill_Name = attacker.PlayerName; - Globals.ShowHud_Kill_Name2 = victim.PlayerName; - Globals.ShowHud_Kill.Add(players.SteamID, Localizer["center.announce.quake.teamkill"]); - } - HUDTimer?.Kill(); - HUDTimer = null; - HUDTimer = AddTimer(TIntervalHUD, HUDTimer_Callback, TimerFlags.STOP_ON_MAPCHANGE); - }); - } + + if(personData.quakesounds) + { + + }else + { + players.ExecuteClientCommand("play " + TsoundPath); + } + + if(personData.quakecmessages) + { + + }else + { + if (TShowChat && !string.IsNullOrEmpty(Localizer["chat.announce.quake.teamkill"])) + { + Helper.AdvancedPrintToChat(players, Localizer["chat.announce.quake.teamkill"], attacker.PlayerName, victim.PlayerName); + } + } + + + if(personData.quakehmessages) + { + + }else + { + if (TShowCenter && !string.IsNullOrEmpty(Localizer["center.announce.quake.teamkill"])) + { + Server.NextFrame(() => + { + if(Globals.ShowHud_Kill.ContainsKey(players.SteamID)) + { + Globals.ShowHud_Kill.Remove(players.SteamID); + } + if(!Globals.ShowHud_Kill.ContainsKey(players.SteamID)) + { + Globals.ShowHud_Kill_Name = attacker.PlayerName; + Globals.ShowHud_Kill_Name2 = victim.PlayerName; + Globals.ShowHud_Kill.Add(players.SteamID, Localizer["center.announce.quake.teamkill"]); + } + HUDTimer?.Kill(); + HUDTimer = null; + HUDTimer = AddTimer(TIntervalHUD, HUDTimer_Callback, TimerFlags.STOP_ON_MAPCHANGE); + }); + } + } + + } }); }else { - attacker.ExecuteClientCommand("play " + TsoundPath); - if (TShowChat && !string.IsNullOrEmpty(Localizer["chat.quake.teamkill"])) - { - Helper.AdvancedPrintToChat(attacker, Localizer["chat.quake.teamkill"], victim.PlayerName); - } + if(personData.quakesounds) + { - if (TShowCenter && !string.IsNullOrEmpty(Localizer["center.quake.teamkill"])) - { - Server.NextFrame(() => - { - if(Globals.ShowHud_Kill.ContainsKey(attacker.SteamID)) - { - Globals.ShowHud_Kill.Remove(attacker.SteamID); - } - if(!Globals.ShowHud_Kill.ContainsKey(attacker.SteamID)) - { - Globals.ShowHud_Kill_Name = victim.PlayerName; - Globals.ShowHud_Kill.Add(attacker.SteamID, Localizer[$"center.quake.teamkill"]); - } - HUDTimer?.Kill(); - HUDTimer = null; - HUDTimer = AddTimer(TIntervalHUD, HUDTimer_Callback, TimerFlags.STOP_ON_MAPCHANGE); - }); - } + }else + { + attacker.ExecuteClientCommand("play " + TsoundPath); + } + if(personData.quakecmessages) + { + + }else + { + if (TShowChat && !string.IsNullOrEmpty(Localizer["chat.quake.teamkill"])) + { + Helper.AdvancedPrintToChat(attacker, Localizer["chat.quake.teamkill"], victim.PlayerName); + } + } + + + if(personData.quakehmessages) + { + + }else + { + if (TShowCenter && !string.IsNullOrEmpty(Localizer["center.quake.teamkill"])) + { + Server.NextFrame(() => + { + if(Globals.ShowHud_Kill.ContainsKey(attacker.SteamID)) + { + Globals.ShowHud_Kill.Remove(attacker.SteamID); + } + if(!Globals.ShowHud_Kill.ContainsKey(attacker.SteamID)) + { + Globals.ShowHud_Kill_Name = victim.PlayerName; + Globals.ShowHud_Kill.Add(attacker.SteamID, Localizer[$"center.quake.teamkill"]); + } + HUDTimer?.Kill(); + HUDTimer = null; + HUDTimer = AddTimer(TIntervalHUD, HUDTimer_Callback, TimerFlags.STOP_ON_MAPCHANGE); + }); + } + } } return HookResult.Continue; } @@ -695,63 +819,102 @@ private HookResult OnPlayerDeathQuake(EventPlayerDeath @event, GameEventInfo inf { if(players != null && players.IsValid && !players.IsBot) { - players.ExecuteClientCommand("play " + FsoundPath); - if (FShowChat && !string.IsNullOrEmpty(Localizer["chat.announce.quake.firstblood"])) + + if(personData.quakesounds) { - Helper.AdvancedPrintToChat(players, Localizer["chat.announce.quake.firstblood"], attacker.PlayerName, victim.PlayerName); + + }else + { + players.ExecuteClientCommand("play " + FsoundPath); } + if(personData.quakecmessages) + { - if (FShowCenter && !string.IsNullOrEmpty(Localizer["center.announce.quake.firstblood"])) + }else { - Server.NextFrame(() => + if (FShowChat && !string.IsNullOrEmpty(Localizer["chat.announce.quake.firstblood"])) { - if(Globals.ShowHud_Kill.ContainsKey(players.SteamID)) - { - Globals.ShowHud_Kill.Remove(players.SteamID); - } - if(!Globals.ShowHud_Kill.ContainsKey(players.SteamID)) - { - Globals.ShowHud_Kill_Name = attacker.PlayerName; - Globals.ShowHud_Kill_Name2 = victim.PlayerName; - Globals.ShowHud_Kill.Add(players.SteamID, Localizer["center.announce.quake.firstblood"]); - } + Helper.AdvancedPrintToChat(players, Localizer["chat.announce.quake.firstblood"], attacker.PlayerName, victim.PlayerName); + } + } + + if(personData.quakehmessages) + { - HUDTimer?.Kill(); - HUDTimer = null; - HUDTimer = AddTimer(FIntervalHUD, HUDTimer_Callback, TimerFlags.STOP_ON_MAPCHANGE); - }); + }else + { + if (FShowCenter && !string.IsNullOrEmpty(Localizer["center.announce.quake.firstblood"])) + { + Server.NextFrame(() => + { + if(Globals.ShowHud_Kill.ContainsKey(players.SteamID)) + { + Globals.ShowHud_Kill.Remove(players.SteamID); + } + if(!Globals.ShowHud_Kill.ContainsKey(players.SteamID)) + { + Globals.ShowHud_Kill_Name = attacker.PlayerName; + Globals.ShowHud_Kill_Name2 = victim.PlayerName; + Globals.ShowHud_Kill.Add(players.SteamID, Localizer["center.announce.quake.firstblood"]); + } + + HUDTimer?.Kill(); + HUDTimer = null; + HUDTimer = AddTimer(FIntervalHUD, HUDTimer_Callback, TimerFlags.STOP_ON_MAPCHANGE); + }); + } } + } }); }else { - attacker.ExecuteClientCommand("play " + FsoundPath); - if (FShowChat && !string.IsNullOrEmpty(Localizer["chat.quake.firstblood"])) + if(personData.quakesounds) + { + + }else { - Helper.AdvancedPrintToChat(attacker, Localizer["chat.quake.firstblood"], victim.PlayerName); + attacker.ExecuteClientCommand("play " + FsoundPath); } + + if(personData.quakecmessages) + { - if (FShowCenter && !string.IsNullOrEmpty(Localizer["center.quake.firstblood"])) + }else { - Server.NextFrame(() => + if (FShowChat && !string.IsNullOrEmpty(Localizer["chat.quake.firstblood"])) { - if(Globals.ShowHud_Kill.ContainsKey(attacker.SteamID)) - { - Globals.ShowHud_Kill.Remove(attacker.SteamID); - } - if(!Globals.ShowHud_Kill.ContainsKey(attacker.SteamID)) - { - Globals.ShowHud_Kill_Name = victim.PlayerName; - Globals.ShowHud_Kill.Add(attacker.SteamID, Localizer[$"center.quake.firstblood"]); - } - HUDTimer?.Kill(); - HUDTimer = null; - HUDTimer = AddTimer(FIntervalHUD, HUDTimer_Callback, TimerFlags.STOP_ON_MAPCHANGE); - }); + Helper.AdvancedPrintToChat(attacker, Localizer["chat.quake.firstblood"], victim.PlayerName); + } } + + if(personData.quakehmessages) + { + + }else + { + if (FShowCenter && !string.IsNullOrEmpty(Localizer["center.quake.firstblood"])) + { + Server.NextFrame(() => + { + if(Globals.ShowHud_Kill.ContainsKey(attacker.SteamID)) + { + Globals.ShowHud_Kill.Remove(attacker.SteamID); + } + if(!Globals.ShowHud_Kill.ContainsKey(attacker.SteamID)) + { + Globals.ShowHud_Kill_Name = victim.PlayerName; + Globals.ShowHud_Kill.Add(attacker.SteamID, Localizer[$"center.quake.firstblood"]); + } + HUDTimer?.Kill(); + HUDTimer = null; + HUDTimer = AddTimer(FIntervalHUD, HUDTimer_Callback, TimerFlags.STOP_ON_MAPCHANGE); + }); + } + } } Globals.First_Blood = false; return HookResult.Continue; @@ -795,119 +958,185 @@ private HookResult OnPlayerDeathQuake(EventPlayerDeath @event, GameEventInfo inf { if(players != null && players.IsValid && !players.IsBot) { - players.ExecuteClientCommand("play " + NsoundPath); + if(personData.quakesounds) + { + + }else + { + players.ExecuteClientCommand("play " + NsoundPath); + } + if(NSteak) { - if (NShowChat && !string.IsNullOrEmpty(Localizer[$"chat.announce.quake.knife.streak.{numberofknifekill}"])) + if(personData.quakecmessages) { - Helper.AdvancedPrintToChat(players, Localizer[$"chat.announce.quake.knife.streak.{numberofknifekill}"], attacker.PlayerName, numberofknifekill); + + }else + { + if (NShowChat && !string.IsNullOrEmpty(Localizer[$"chat.announce.quake.knife.streak.{numberofknifekill}"])) + { + Helper.AdvancedPrintToChat(players, Localizer[$"chat.announce.quake.knife.streak.{numberofknifekill}"], attacker.PlayerName, numberofknifekill); + } } + + if(personData.quakehmessages) + { - if (NShowCenter && !string.IsNullOrEmpty(Localizer[$"center.announce.quake.knife.streak.{numberofknifekill}"])) + }else { - Server.NextFrame(() => + if (NShowCenter && !string.IsNullOrEmpty(Localizer[$"center.announce.quake.knife.streak.{numberofknifekill}"])) { - if(Globals.ShowHud_Kill.ContainsKey(players.SteamID)) + Server.NextFrame(() => { - Globals.ShowHud_Kill.Remove(players.SteamID); - } - if(!Globals.ShowHud_Kill.ContainsKey(players.SteamID)) - { - Globals.ShowHud_Kill_Name2 = ""; - Globals.ShowHud_Kill_Name = attacker.PlayerName; - Globals.ShowHud_Kill_int = numberofknifekill; - Globals.ShowHud_Kill.Add(players.SteamID, Localizer[$"center.announce.quake.knife.streak.{numberofknifekill}"]); - } - HUDTimer?.Kill(); - HUDTimer = null; - HUDTimer = AddTimer(NIntervalHUD, HUDTimer_Callback, TimerFlags.STOP_ON_MAPCHANGE); - }); + if(Globals.ShowHud_Kill.ContainsKey(players.SteamID)) + { + Globals.ShowHud_Kill.Remove(players.SteamID); + } + if(!Globals.ShowHud_Kill.ContainsKey(players.SteamID)) + { + Globals.ShowHud_Kill_Name2 = ""; + Globals.ShowHud_Kill_Name = attacker.PlayerName; + Globals.ShowHud_Kill_int = numberofknifekill; + Globals.ShowHud_Kill.Add(players.SteamID, Localizer[$"center.announce.quake.knife.streak.{numberofknifekill}"]); + } + HUDTimer?.Kill(); + HUDTimer = null; + HUDTimer = AddTimer(NIntervalHUD, HUDTimer_Callback, TimerFlags.STOP_ON_MAPCHANGE); + }); + } } + }else { - if (NShowChat && !string.IsNullOrEmpty(Localizer["chat.announce.quake.knife"])) + if(personData.quakecmessages) + { + + }else { - Helper.AdvancedPrintToChat(players, Localizer["chat.announce.quake.knife"], attacker.PlayerName, victim.PlayerName); + if (NShowChat && !string.IsNullOrEmpty(Localizer["chat.announce.quake.knife"])) + { + Helper.AdvancedPrintToChat(players, Localizer["chat.announce.quake.knife"], attacker.PlayerName, victim.PlayerName); + } } + + if(personData.quakehmessages) + { - if (NShowCenter && !string.IsNullOrEmpty(Localizer["center.announce.quake.knife"])) + }else { - Server.NextFrame(() => + if (NShowCenter && !string.IsNullOrEmpty(Localizer["center.announce.quake.knife"])) { - if(Globals.ShowHud_Kill.ContainsKey(players.SteamID)) - { - Globals.ShowHud_Kill.Remove(players.SteamID); - } - if(!Globals.ShowHud_Kill.ContainsKey(players.SteamID)) + Server.NextFrame(() => { - Globals.ShowHud_Kill_Name = attacker.PlayerName; - Globals.ShowHud_Kill_Name2 = victim.PlayerName; - Globals.ShowHud_Kill.Add(players.SteamID, Localizer["center.announce.quake.knife"]); - } - HUDTimer?.Kill(); - HUDTimer = null; - HUDTimer = AddTimer(NIntervalHUD, HUDTimer_Callback, TimerFlags.STOP_ON_MAPCHANGE); - }); + if(Globals.ShowHud_Kill.ContainsKey(players.SteamID)) + { + Globals.ShowHud_Kill.Remove(players.SteamID); + } + if(!Globals.ShowHud_Kill.ContainsKey(players.SteamID)) + { + Globals.ShowHud_Kill_Name = attacker.PlayerName; + Globals.ShowHud_Kill_Name2 = victim.PlayerName; + Globals.ShowHud_Kill.Add(players.SteamID, Localizer["center.announce.quake.knife"]); + } + HUDTimer?.Kill(); + HUDTimer = null; + HUDTimer = AddTimer(NIntervalHUD, HUDTimer_Callback, TimerFlags.STOP_ON_MAPCHANGE); + }); + } } + } } }); }else { - attacker.ExecuteClientCommand("play " + NsoundPath); + if(personData.quakesounds) + { + + }else + { + attacker.ExecuteClientCommand("play " + NsoundPath); + } + if(NSteak) { - if (NShowChat && !string.IsNullOrEmpty(Localizer[$"chat.quake.knife.streak.{numberofknifekill}"])) + if(personData.quakecmessages) + { + + }else { - Helper.AdvancedPrintToChat(attacker, Localizer[$"chat.quake.knife.streak.{numberofknifekill}"], numberofknifekill); + if (NShowChat && !string.IsNullOrEmpty(Localizer[$"chat.quake.knife.streak.{numberofknifekill}"])) + { + Helper.AdvancedPrintToChat(attacker, Localizer[$"chat.quake.knife.streak.{numberofknifekill}"], numberofknifekill); + } } + + if(personData.quakehmessages) + { - if (NShowCenter && !string.IsNullOrEmpty(Localizer[$"center.quake.knife.streak.{numberofknifekill}"])) + }else { - Server.NextFrame(() => + if (NShowCenter && !string.IsNullOrEmpty(Localizer[$"center.quake.knife.streak.{numberofknifekill}"])) { - if(Globals.ShowHud_Kill.ContainsKey(attacker.SteamID)) + Server.NextFrame(() => { - Globals.ShowHud_Kill.Remove(attacker.SteamID); - } - if(!Globals.ShowHud_Kill.ContainsKey(attacker.SteamID)) - { - Globals.ShowHud_Kill_Name2 = ""; - Globals.ShowHud_Kill_int = numberofknifekill; - Globals.ShowHud_Kill.Add(attacker.SteamID, Localizer[$"center.quake.knife.streak.{numberofknifekill}"]); - } - HUDTimer?.Kill(); - HUDTimer = null; - HUDTimer = AddTimer(NIntervalHUD, HUDTimer_Callback, TimerFlags.STOP_ON_MAPCHANGE); - }); + if(Globals.ShowHud_Kill.ContainsKey(attacker.SteamID)) + { + Globals.ShowHud_Kill.Remove(attacker.SteamID); + } + if(!Globals.ShowHud_Kill.ContainsKey(attacker.SteamID)) + { + Globals.ShowHud_Kill_Name2 = ""; + Globals.ShowHud_Kill_int = numberofknifekill; + Globals.ShowHud_Kill.Add(attacker.SteamID, Localizer[$"center.quake.knife.streak.{numberofknifekill}"]); + } + HUDTimer?.Kill(); + HUDTimer = null; + HUDTimer = AddTimer(NIntervalHUD, HUDTimer_Callback, TimerFlags.STOP_ON_MAPCHANGE); + }); + } } + }else { - if (NShowChat && !string.IsNullOrEmpty(Localizer["chat.quake.knife"])) + if(personData.quakecmessages) { - Helper.AdvancedPrintToChat(attacker, Localizer["chat.quake.knife"], victim.PlayerName); + + }else + { + if (NShowChat && !string.IsNullOrEmpty(Localizer["chat.quake.knife"])) + { + Helper.AdvancedPrintToChat(attacker, Localizer["chat.quake.knife"], victim.PlayerName); + } } + + if(personData.quakehmessages) + { - if (NShowCenter && !string.IsNullOrEmpty(Localizer["center.quake.knife"])) + }else { - Server.NextFrame(() => + if (NShowCenter && !string.IsNullOrEmpty(Localizer["center.quake.knife"])) { - if(Globals.ShowHud_Kill.ContainsKey(attacker.SteamID)) + Server.NextFrame(() => { - Globals.ShowHud_Kill.Remove(attacker.SteamID); - } - if(!Globals.ShowHud_Kill.ContainsKey(attacker.SteamID)) - { - Globals.ShowHud_Kill_Name = ""; - Globals.ShowHud_Kill_Name = victim.PlayerName; - Globals.ShowHud_Kill.Add(attacker.SteamID, Localizer[$"center.quake.knife"]); - } - HUDTimer?.Kill(); - HUDTimer = null; - HUDTimer = AddTimer(NIntervalHUD, HUDTimer_Callback, TimerFlags.STOP_ON_MAPCHANGE); - }); + if(Globals.ShowHud_Kill.ContainsKey(attacker.SteamID)) + { + Globals.ShowHud_Kill.Remove(attacker.SteamID); + } + if(!Globals.ShowHud_Kill.ContainsKey(attacker.SteamID)) + { + Globals.ShowHud_Kill_Name = ""; + Globals.ShowHud_Kill_Name = victim.PlayerName; + Globals.ShowHud_Kill.Add(attacker.SteamID, Localizer[$"center.quake.knife"]); + } + HUDTimer?.Kill(); + HUDTimer = null; + HUDTimer = AddTimer(NIntervalHUD, HUDTimer_Callback, TimerFlags.STOP_ON_MAPCHANGE); + }); + } } + } } Globals.lastPlayTimesKnife[playeridattacker] = DateTime.Now; @@ -952,60 +1181,91 @@ private HookResult OnPlayerDeathQuake(EventPlayerDeath @event, GameEventInfo inf { if(players != null && players.IsValid && !players.IsBot) { - players.ExecuteClientCommand("play " + GsoundPath); + if(personData.quakesounds) + { + + }else + { + players.ExecuteClientCommand("play " + GsoundPath); + } + if(GSteak) { - if (GShowChat && !string.IsNullOrEmpty(Localizer[$"chat.announce.quake.grenade.streak.{numberofnadekill}"])) + if(personData.quakecmessages) + { + + }else { - Helper.AdvancedPrintToChat(players, Localizer[$"chat.announce.quake.grenade.streak.{numberofnadekill}"], attacker.PlayerName, numberofnadekill); + if (GShowChat && !string.IsNullOrEmpty(Localizer[$"chat.announce.quake.grenade.streak.{numberofnadekill}"])) + { + Helper.AdvancedPrintToChat(players, Localizer[$"chat.announce.quake.grenade.streak.{numberofnadekill}"], attacker.PlayerName, numberofnadekill); + } } + + if(personData.quakehmessages) + { - if (GShowCenter && !string.IsNullOrEmpty(Localizer[$"center.announce.quake.grenade.streak.{numberofnadekill}"])) + }else { - Server.NextFrame(() => + if (GShowCenter && !string.IsNullOrEmpty(Localizer[$"center.announce.quake.grenade.streak.{numberofnadekill}"])) { - if(Globals.ShowHud_Kill.ContainsKey(players.SteamID)) - { - Globals.ShowHud_Kill.Remove(players.SteamID); - } - if(!Globals.ShowHud_Kill.ContainsKey(players.SteamID)) + Server.NextFrame(() => { - Globals.ShowHud_Kill_Name2 = ""; - Globals.ShowHud_Kill_Name = attacker.PlayerName; - Globals.ShowHud_Kill_int = numberofnadekill; - Globals.ShowHud_Kill.Add(players.SteamID, Localizer[$"center.announce.quake.grenade.streak.{numberofnadekill}"]); - } - HUDTimer?.Kill(); - HUDTimer = null; - HUDTimer = AddTimer(GIntervalHUD, HUDTimer_Callback, TimerFlags.STOP_ON_MAPCHANGE); - }); + if(Globals.ShowHud_Kill.ContainsKey(players.SteamID)) + { + Globals.ShowHud_Kill.Remove(players.SteamID); + } + if(!Globals.ShowHud_Kill.ContainsKey(players.SteamID)) + { + Globals.ShowHud_Kill_Name2 = ""; + Globals.ShowHud_Kill_Name = attacker.PlayerName; + Globals.ShowHud_Kill_int = numberofnadekill; + Globals.ShowHud_Kill.Add(players.SteamID, Localizer[$"center.announce.quake.grenade.streak.{numberofnadekill}"]); + } + HUDTimer?.Kill(); + HUDTimer = null; + HUDTimer = AddTimer(GIntervalHUD, HUDTimer_Callback, TimerFlags.STOP_ON_MAPCHANGE); + }); + } } + }else { - if (GShowChat && !string.IsNullOrEmpty(Localizer["chat.announce.quake.grenade"])) + if(personData.quakecmessages) { - Helper.AdvancedPrintToChat(players, Localizer["chat.announce.quake.grenade"], attacker.PlayerName, victim.PlayerName); + + }else + { + if (GShowChat && !string.IsNullOrEmpty(Localizer["chat.announce.quake.grenade"])) + { + Helper.AdvancedPrintToChat(players, Localizer["chat.announce.quake.grenade"], attacker.PlayerName, victim.PlayerName); + } } + if(personData.quakehmessages) + { - if (GShowCenter && !string.IsNullOrEmpty(Localizer["center.announce.quake.grenade"])) + }else { - Server.NextFrame(() => + if (GShowCenter && !string.IsNullOrEmpty(Localizer["center.announce.quake.grenade"])) { - if(Globals.ShowHud_Kill.ContainsKey(players.SteamID)) + Server.NextFrame(() => { - Globals.ShowHud_Kill.Remove(players.SteamID); - } - if(!Globals.ShowHud_Kill.ContainsKey(players.SteamID)) - { - Globals.ShowHud_Kill_Name = attacker.PlayerName; - Globals.ShowHud_Kill_Name2 = victim.PlayerName; - Globals.ShowHud_Kill.Add(players.SteamID, Localizer["center.announce.quake.grenade"]); - } - HUDTimer?.Kill(); - HUDTimer = null; - HUDTimer = AddTimer(GIntervalHUD, HUDTimer_Callback, TimerFlags.STOP_ON_MAPCHANGE); - }); + if(Globals.ShowHud_Kill.ContainsKey(players.SteamID)) + { + Globals.ShowHud_Kill.Remove(players.SteamID); + } + if(!Globals.ShowHud_Kill.ContainsKey(players.SteamID)) + { + Globals.ShowHud_Kill_Name = attacker.PlayerName; + Globals.ShowHud_Kill_Name2 = victim.PlayerName; + Globals.ShowHud_Kill.Add(players.SteamID, Localizer["center.announce.quake.grenade"]); + } + HUDTimer?.Kill(); + HUDTimer = null; + HUDTimer = AddTimer(GIntervalHUD, HUDTimer_Callback, TimerFlags.STOP_ON_MAPCHANGE); + }); + } } } } @@ -1013,59 +1273,92 @@ private HookResult OnPlayerDeathQuake(EventPlayerDeath @event, GameEventInfo inf }else { - attacker.ExecuteClientCommand("play " + GsoundPath); + if(personData.quakesounds) + { + + }else + { + attacker.ExecuteClientCommand("play " + GsoundPath); + } + if(GSteak) { - if (GShowChat && !string.IsNullOrEmpty(Localizer[$"chat.quake.grenade.streak.{numberofnadekill}"])) + if(personData.quakecmessages) + { + + }else { - Helper.AdvancedPrintToChat(attacker, Localizer[$"chat.quake.grenade.streak.{numberofnadekill}"], numberofnadekill); + if (GShowChat && !string.IsNullOrEmpty(Localizer[$"chat.quake.grenade.streak.{numberofnadekill}"])) + { + Helper.AdvancedPrintToChat(attacker, Localizer[$"chat.quake.grenade.streak.{numberofnadekill}"], numberofnadekill); + } } + + if(personData.quakehmessages) + { - if (GShowCenter && !string.IsNullOrEmpty(Localizer[$"center.quake.grenade.streak.{numberofnadekill}"])) + }else { - Server.NextFrame(() => + if (GShowCenter && !string.IsNullOrEmpty(Localizer[$"center.quake.grenade.streak.{numberofnadekill}"])) { - if(Globals.ShowHud_Kill.ContainsKey(attacker.SteamID)) - { - Globals.ShowHud_Kill.Remove(attacker.SteamID); - } - if(!Globals.ShowHud_Kill.ContainsKey(attacker.SteamID)) + Server.NextFrame(() => { - Globals.ShowHud_Kill_Name2 = ""; - Globals.ShowHud_Kill_Name = ""; - Globals.ShowHud_Kill_int = numberofnadekill; - Globals.ShowHud_Kill.Add(attacker.SteamID, Localizer[$"center.quake.grenade.streak.{numberofnadekill}"]); - } - HUDTimer?.Kill(); - HUDTimer = null; - HUDTimer = AddTimer(GIntervalHUD, HUDTimer_Callback, TimerFlags.STOP_ON_MAPCHANGE); - }); + if(Globals.ShowHud_Kill.ContainsKey(attacker.SteamID)) + { + Globals.ShowHud_Kill.Remove(attacker.SteamID); + } + if(!Globals.ShowHud_Kill.ContainsKey(attacker.SteamID)) + { + Globals.ShowHud_Kill_Name2 = ""; + Globals.ShowHud_Kill_Name = ""; + Globals.ShowHud_Kill_int = numberofnadekill; + Globals.ShowHud_Kill.Add(attacker.SteamID, Localizer[$"center.quake.grenade.streak.{numberofnadekill}"]); + } + HUDTimer?.Kill(); + HUDTimer = null; + HUDTimer = AddTimer(GIntervalHUD, HUDTimer_Callback, TimerFlags.STOP_ON_MAPCHANGE); + }); + } } + }else { - if (GShowChat && !string.IsNullOrEmpty(Localizer["chat.quake.grenade"])) + if(personData.quakecmessages) + { + + }else { - Helper.AdvancedPrintToChat(attacker, Localizer["chat.quake.grenade"], victim.PlayerName); + if (GShowChat && !string.IsNullOrEmpty(Localizer["chat.quake.grenade"])) + { + Helper.AdvancedPrintToChat(attacker, Localizer["chat.quake.grenade"], victim.PlayerName); + } } + + if(personData.quakehmessages) + { - if (GShowCenter && !string.IsNullOrEmpty(Localizer["center.quake.grenade"])) + }else { - Server.NextFrame(() => + if (GShowCenter && !string.IsNullOrEmpty(Localizer["center.quake.grenade"])) { - if(Globals.ShowHud_Kill.ContainsKey(attacker.SteamID)) - { - Globals.ShowHud_Kill.Remove(attacker.SteamID); - } - if(!Globals.ShowHud_Kill.ContainsKey(attacker.SteamID)) + Server.NextFrame(() => { - Globals.ShowHud_Kill_Name = victim.PlayerName; - Globals.ShowHud_Kill.Add(attacker.SteamID, Localizer[$"center.quake.grenade"]); - } - HUDTimer?.Kill(); - HUDTimer = null; - HUDTimer = AddTimer(GIntervalHUD, HUDTimer_Callback, TimerFlags.STOP_ON_MAPCHANGE); - }); + if(Globals.ShowHud_Kill.ContainsKey(attacker.SteamID)) + { + Globals.ShowHud_Kill.Remove(attacker.SteamID); + } + if(!Globals.ShowHud_Kill.ContainsKey(attacker.SteamID)) + { + Globals.ShowHud_Kill_Name = victim.PlayerName; + Globals.ShowHud_Kill.Add(attacker.SteamID, Localizer[$"center.quake.grenade"]); + } + HUDTimer?.Kill(); + HUDTimer = null; + HUDTimer = AddTimer(GIntervalHUD, HUDTimer_Callback, TimerFlags.STOP_ON_MAPCHANGE); + }); + } } + } } Globals.lastPlayTimesNade[playeridattacker] = DateTime.Now; @@ -1110,60 +1403,93 @@ private HookResult OnPlayerDeathQuake(EventPlayerDeath @event, GameEventInfo inf { if(players != null && players.IsValid && !players.IsBot) { - players.ExecuteClientCommand("play " + MsoundPath); + if(personData.quakesounds) + { + + }else + { + players.ExecuteClientCommand("play " + MsoundPath); + } + if(MSteak) { - if (MShowChat && !string.IsNullOrEmpty(Localizer[$"chat.announce.quake.molly.streak.{numberofmollykill}"])) + if(personData.quakecmessages) { - Helper.AdvancedPrintToChat(players, Localizer[$"chat.announce.quake.molly.streak.{numberofmollykill}"], attacker.PlayerName, numberofmollykill); + + }else + { + if (MShowChat && !string.IsNullOrEmpty(Localizer[$"chat.announce.quake.molly.streak.{numberofmollykill}"])) + { + Helper.AdvancedPrintToChat(players, Localizer[$"chat.announce.quake.molly.streak.{numberofmollykill}"], attacker.PlayerName, numberofmollykill); + } } + + if(personData.quakehmessages) + { - if (MShowCenter && !string.IsNullOrEmpty(Localizer[$"center.announce.quake.molly.streak.{numberofmollykill}"])) + }else { - Server.NextFrame(() => + if (MShowCenter && !string.IsNullOrEmpty(Localizer[$"center.announce.quake.molly.streak.{numberofmollykill}"])) { - if(Globals.ShowHud_Kill.ContainsKey(players.SteamID)) + Server.NextFrame(() => { - Globals.ShowHud_Kill.Remove(players.SteamID); - } - if(!Globals.ShowHud_Kill.ContainsKey(players.SteamID)) - { - Globals.ShowHud_Kill_Name2 = ""; - Globals.ShowHud_Kill_Name = attacker.PlayerName; - Globals.ShowHud_Kill_int = numberofmollykill; - Globals.ShowHud_Kill.Add(players.SteamID, Localizer[$"center.announce.quake.molly.streak.{numberofmollykill}"]); - } - HUDTimer?.Kill(); - HUDTimer = null; - HUDTimer = AddTimer(MIntervalHUD, HUDTimer_Callback, TimerFlags.STOP_ON_MAPCHANGE); - }); + if(Globals.ShowHud_Kill.ContainsKey(players.SteamID)) + { + Globals.ShowHud_Kill.Remove(players.SteamID); + } + if(!Globals.ShowHud_Kill.ContainsKey(players.SteamID)) + { + Globals.ShowHud_Kill_Name2 = ""; + Globals.ShowHud_Kill_Name = attacker.PlayerName; + Globals.ShowHud_Kill_int = numberofmollykill; + Globals.ShowHud_Kill.Add(players.SteamID, Localizer[$"center.announce.quake.molly.streak.{numberofmollykill}"]); + } + HUDTimer?.Kill(); + HUDTimer = null; + HUDTimer = AddTimer(MIntervalHUD, HUDTimer_Callback, TimerFlags.STOP_ON_MAPCHANGE); + }); + } } + }else { - if (MShowChat && !string.IsNullOrEmpty(Localizer["chat.announce.quake.molly"])) + if(personData.quakecmessages) + { + + }else { - Helper.AdvancedPrintToChat(players, Localizer["chat.announce.quake.molly"], attacker.PlayerName, victim.PlayerName); + if (MShowChat && !string.IsNullOrEmpty(Localizer["chat.announce.quake.molly"])) + { + Helper.AdvancedPrintToChat(players, Localizer["chat.announce.quake.molly"], attacker.PlayerName, victim.PlayerName); + } } + + if(personData.quakehmessages) + { - if (MShowCenter && !string.IsNullOrEmpty(Localizer["center.announce.quake.molly"])) + }else { - Server.NextFrame(() => + if (MShowCenter && !string.IsNullOrEmpty(Localizer["center.announce.quake.molly"])) { - if(Globals.ShowHud_Kill.ContainsKey(players.SteamID)) - { - Globals.ShowHud_Kill.Remove(players.SteamID); - } - if(!Globals.ShowHud_Kill.ContainsKey(players.SteamID)) + Server.NextFrame(() => { - Globals.ShowHud_Kill_Name = attacker.PlayerName; - Globals.ShowHud_Kill_Name2 = victim.PlayerName; - Globals.ShowHud_Kill.Add(players.SteamID, Localizer["center.announce.quake.molly"]); - } - HUDTimer?.Kill(); - HUDTimer = null; - HUDTimer = AddTimer(MIntervalHUD, HUDTimer_Callback, TimerFlags.STOP_ON_MAPCHANGE); - }); + if(Globals.ShowHud_Kill.ContainsKey(players.SteamID)) + { + Globals.ShowHud_Kill.Remove(players.SteamID); + } + if(!Globals.ShowHud_Kill.ContainsKey(players.SteamID)) + { + Globals.ShowHud_Kill_Name = attacker.PlayerName; + Globals.ShowHud_Kill_Name2 = victim.PlayerName; + Globals.ShowHud_Kill.Add(players.SteamID, Localizer["center.announce.quake.molly"]); + } + HUDTimer?.Kill(); + HUDTimer = null; + HUDTimer = AddTimer(MIntervalHUD, HUDTimer_Callback, TimerFlags.STOP_ON_MAPCHANGE); + }); + } } + } } }); @@ -1172,57 +1498,90 @@ private HookResult OnPlayerDeathQuake(EventPlayerDeath @event, GameEventInfo inf { if(MSteak) { - attacker.ExecuteClientCommand("play " + MsoundPath); - if (MShowChat && !string.IsNullOrEmpty(Localizer[$"chat.quake.molly.streak.{numberofmollykill}"])) + if(personData.quakesounds) { - Helper.AdvancedPrintToChat(attacker, Localizer[$"chat.quake.molly.streak.{numberofmollykill}"], numberofmollykill); + + }else + { + attacker.ExecuteClientCommand("play " + MsoundPath); } - if (MShowCenter && !string.IsNullOrEmpty(Localizer[$"center.quake.molly.streak.{numberofmollykill}"])) + if(personData.quakecmessages) { - Server.NextFrame(() => + + }else + { + if (MShowChat && !string.IsNullOrEmpty(Localizer[$"chat.quake.molly.streak.{numberofmollykill}"])) { - if(Globals.ShowHud_Kill.ContainsKey(attacker.SteamID)) - { - Globals.ShowHud_Kill.Remove(attacker.SteamID); - } - if(!Globals.ShowHud_Kill.ContainsKey(attacker.SteamID)) + Helper.AdvancedPrintToChat(attacker, Localizer[$"chat.quake.molly.streak.{numberofmollykill}"], numberofmollykill); + } + } + + if(personData.quakehmessages) + { + + }else + { + if (MShowCenter && !string.IsNullOrEmpty(Localizer[$"center.quake.molly.streak.{numberofmollykill}"])) + { + Server.NextFrame(() => { - Globals.ShowHud_Kill_Name2 = ""; - Globals.ShowHud_Kill_Name = ""; - Globals.ShowHud_Kill_int = numberofmollykill; - Globals.ShowHud_Kill.Add(attacker.SteamID, Localizer[$"center.quake.molly.streak.{numberofmollykill}"]); - } - HUDTimer?.Kill(); - HUDTimer = null; - HUDTimer = AddTimer(MIntervalHUD, HUDTimer_Callback, TimerFlags.STOP_ON_MAPCHANGE); - }); + if(Globals.ShowHud_Kill.ContainsKey(attacker.SteamID)) + { + Globals.ShowHud_Kill.Remove(attacker.SteamID); + } + if(!Globals.ShowHud_Kill.ContainsKey(attacker.SteamID)) + { + Globals.ShowHud_Kill_Name2 = ""; + Globals.ShowHud_Kill_Name = ""; + Globals.ShowHud_Kill_int = numberofmollykill; + Globals.ShowHud_Kill.Add(attacker.SteamID, Localizer[$"center.quake.molly.streak.{numberofmollykill}"]); + } + HUDTimer?.Kill(); + HUDTimer = null; + HUDTimer = AddTimer(MIntervalHUD, HUDTimer_Callback, TimerFlags.STOP_ON_MAPCHANGE); + }); + } } + }else { - if (MShowChat && !string.IsNullOrEmpty(Localizer["chat.quake.molly"])) + if(personData.quakecmessages) + { + + }else { - Helper.AdvancedPrintToChat(attacker, Localizer["chat.quake.molly"], victim.PlayerName); + if (MShowChat && !string.IsNullOrEmpty(Localizer["chat.quake.molly"])) + { + Helper.AdvancedPrintToChat(attacker, Localizer["chat.quake.molly"], victim.PlayerName); + } } + + if(personData.quakehmessages) + { - if (MShowCenter && !string.IsNullOrEmpty(Localizer["center.quake.molly"])) + }else { - Server.NextFrame(() => + if (MShowCenter && !string.IsNullOrEmpty(Localizer["center.quake.molly"])) { - if(Globals.ShowHud_Kill.ContainsKey(attacker.SteamID)) - { - Globals.ShowHud_Kill.Remove(attacker.SteamID); - } - if(!Globals.ShowHud_Kill.ContainsKey(attacker.SteamID)) + Server.NextFrame(() => { - Globals.ShowHud_Kill_Name = victim.PlayerName; - Globals.ShowHud_Kill.Add(attacker.SteamID, Localizer[$"center.quake.molly"]); - } - HUDTimer?.Kill(); - HUDTimer = null; - HUDTimer = AddTimer(MIntervalHUD, HUDTimer_Callback, TimerFlags.STOP_ON_MAPCHANGE); - }); + if(Globals.ShowHud_Kill.ContainsKey(attacker.SteamID)) + { + Globals.ShowHud_Kill.Remove(attacker.SteamID); + } + if(!Globals.ShowHud_Kill.ContainsKey(attacker.SteamID)) + { + Globals.ShowHud_Kill_Name = victim.PlayerName; + Globals.ShowHud_Kill.Add(attacker.SteamID, Localizer[$"center.quake.molly"]); + } + HUDTimer?.Kill(); + HUDTimer = null; + HUDTimer = AddTimer(MIntervalHUD, HUDTimer_Callback, TimerFlags.STOP_ON_MAPCHANGE); + }); + } } + } } Globals.lastPlayTimesMolly[playeridattacker] = DateTime.Now; @@ -1267,120 +1626,186 @@ private HookResult OnPlayerDeathQuake(EventPlayerDeath @event, GameEventInfo inf { if(players != null && players.IsValid && !players.IsBot) { - players.ExecuteClientCommand("play " + ZsoundPath); + if(personData.quakesounds) + { + + }else + { + players.ExecuteClientCommand("play " + ZsoundPath); + } + if(ZSteak) { - if (ZShowChat && !string.IsNullOrEmpty(Localizer[$"chat.announce.quake.taser.streak.{numberoftaserkill}"])) + if(personData.quakecmessages) { - Helper.AdvancedPrintToChat(players, Localizer[$"chat.announce.quake.taser.streak.{numberoftaserkill}"], attacker.PlayerName, numberoftaserkill); - } + }else + { + if (ZShowChat && !string.IsNullOrEmpty(Localizer[$"chat.announce.quake.taser.streak.{numberoftaserkill}"])) + { + Helper.AdvancedPrintToChat(players, Localizer[$"chat.announce.quake.taser.streak.{numberoftaserkill}"], attacker.PlayerName, numberoftaserkill); + } + } + + if(personData.quakehmessages) + { - if (ZShowCenter && !string.IsNullOrEmpty(Localizer[$"center.announce.quake.taser.streak.{numberoftaserkill}"])) + }else { - Server.NextFrame(() => + if (ZShowCenter && !string.IsNullOrEmpty(Localizer[$"center.announce.quake.taser.streak.{numberoftaserkill}"])) { - if(Globals.ShowHud_Kill.ContainsKey(players.SteamID)) - { - Globals.ShowHud_Kill.Remove(players.SteamID); - } - if(!Globals.ShowHud_Kill.ContainsKey(players.SteamID)) + Server.NextFrame(() => { - Globals.ShowHud_Kill_Name2 = ""; - Globals.ShowHud_Kill_Name = attacker.PlayerName; - Globals.ShowHud_Kill_int = numberoftaserkill; - Globals.ShowHud_Kill.Add(players.SteamID, Localizer[$"center.announce.quake.taser.streak.{numberoftaserkill}"]); - } - HUDTimer?.Kill(); - HUDTimer = null; - HUDTimer = AddTimer(ZIntervalHUD, HUDTimer_Callback, TimerFlags.STOP_ON_MAPCHANGE); - }); + if(Globals.ShowHud_Kill.ContainsKey(players.SteamID)) + { + Globals.ShowHud_Kill.Remove(players.SteamID); + } + if(!Globals.ShowHud_Kill.ContainsKey(players.SteamID)) + { + Globals.ShowHud_Kill_Name2 = ""; + Globals.ShowHud_Kill_Name = attacker.PlayerName; + Globals.ShowHud_Kill_int = numberoftaserkill; + Globals.ShowHud_Kill.Add(players.SteamID, Localizer[$"center.announce.quake.taser.streak.{numberoftaserkill}"]); + } + HUDTimer?.Kill(); + HUDTimer = null; + HUDTimer = AddTimer(ZIntervalHUD, HUDTimer_Callback, TimerFlags.STOP_ON_MAPCHANGE); + }); + } } + + }else { - if (ZShowChat && !string.IsNullOrEmpty(Localizer["chat.announce.quake.taser"])) + if(personData.quakecmessages) { - Helper.AdvancedPrintToChat(players, Localizer["chat.announce.quake.taser"], attacker.PlayerName, victim.PlayerName); + + }else + { + if (ZShowChat && !string.IsNullOrEmpty(Localizer["chat.announce.quake.taser"])) + { + Helper.AdvancedPrintToChat(players, Localizer["chat.announce.quake.taser"], attacker.PlayerName, victim.PlayerName); + } } + + if(personData.quakehmessages) + { - if (ZShowCenter && !string.IsNullOrEmpty(Localizer["center.announce.quake.taser"])) + }else { - Server.NextFrame(() => + if (ZShowCenter && !string.IsNullOrEmpty(Localizer["center.announce.quake.taser"])) { - if(Globals.ShowHud_Kill.ContainsKey(players.SteamID)) + Server.NextFrame(() => { - Globals.ShowHud_Kill.Remove(players.SteamID); - } - if(!Globals.ShowHud_Kill.ContainsKey(players.SteamID)) - { - Globals.ShowHud_Kill_Name = attacker.PlayerName; - Globals.ShowHud_Kill_Name2 = victim.PlayerName; - Globals.ShowHud_Kill.Add(players.SteamID, Localizer["center.announce.quake.taser"]); - } - HUDTimer?.Kill(); - HUDTimer = null; - HUDTimer = AddTimer(ZIntervalHUD, HUDTimer_Callback, TimerFlags.STOP_ON_MAPCHANGE); - }); + if(Globals.ShowHud_Kill.ContainsKey(players.SteamID)) + { + Globals.ShowHud_Kill.Remove(players.SteamID); + } + if(!Globals.ShowHud_Kill.ContainsKey(players.SteamID)) + { + Globals.ShowHud_Kill_Name = attacker.PlayerName; + Globals.ShowHud_Kill_Name2 = victim.PlayerName; + Globals.ShowHud_Kill.Add(players.SteamID, Localizer["center.announce.quake.taser"]); + } + HUDTimer?.Kill(); + HUDTimer = null; + HUDTimer = AddTimer(ZIntervalHUD, HUDTimer_Callback, TimerFlags.STOP_ON_MAPCHANGE); + }); + } } + } } }); }else { - attacker.ExecuteClientCommand("play " + ZsoundPath); + if(personData.quakesounds) + { + + }else + { + attacker.ExecuteClientCommand("play " + ZsoundPath); + } + if(ZSteak) { - if (ZShowChat && !string.IsNullOrEmpty(Localizer[$"chat.quake.taser.streak.{numberoftaserkill}"])) + if(personData.quakecmessages) + { + + }else { - Helper.AdvancedPrintToChat(attacker, Localizer[$"chat.quake.taser.streak.{numberoftaserkill}"], numberoftaserkill); + if (ZShowChat && !string.IsNullOrEmpty(Localizer[$"chat.quake.taser.streak.{numberoftaserkill}"])) + { + Helper.AdvancedPrintToChat(attacker, Localizer[$"chat.quake.taser.streak.{numberoftaserkill}"], numberoftaserkill); + } } + + if(personData.quakehmessages) + { - if (ZShowCenter && !string.IsNullOrEmpty(Localizer[$"center.quake.taser.streak.{numberoftaserkill}"])) + }else { - Server.NextFrame(() => + if (ZShowCenter && !string.IsNullOrEmpty(Localizer[$"center.quake.taser.streak.{numberoftaserkill}"])) { - if(Globals.ShowHud_Kill.ContainsKey(attacker.SteamID)) + Server.NextFrame(() => { - Globals.ShowHud_Kill.Remove(attacker.SteamID); - } - if(!Globals.ShowHud_Kill.ContainsKey(attacker.SteamID)) - { - Globals.ShowHud_Kill_Name2 = ""; - Globals.ShowHud_Kill_Name = ""; - Globals.ShowHud_Kill_int = numberoftaserkill; - Globals.ShowHud_Kill.Add(attacker.SteamID, Localizer[$"center.quake.taser.streak.{numberoftaserkill}"]); - } - HUDTimer?.Kill(); - HUDTimer = null; - HUDTimer = AddTimer(ZIntervalHUD, HUDTimer_Callback, TimerFlags.STOP_ON_MAPCHANGE); - }); + if(Globals.ShowHud_Kill.ContainsKey(attacker.SteamID)) + { + Globals.ShowHud_Kill.Remove(attacker.SteamID); + } + if(!Globals.ShowHud_Kill.ContainsKey(attacker.SteamID)) + { + Globals.ShowHud_Kill_Name2 = ""; + Globals.ShowHud_Kill_Name = ""; + Globals.ShowHud_Kill_int = numberoftaserkill; + Globals.ShowHud_Kill.Add(attacker.SteamID, Localizer[$"center.quake.taser.streak.{numberoftaserkill}"]); + } + HUDTimer?.Kill(); + HUDTimer = null; + HUDTimer = AddTimer(ZIntervalHUD, HUDTimer_Callback, TimerFlags.STOP_ON_MAPCHANGE); + }); + } } + }else { - if (ZShowChat && !string.IsNullOrEmpty(Localizer["chat.quake.taser"])) + if(personData.quakecmessages) + { + + }else { - Helper.AdvancedPrintToChat(attacker, Localizer["chat.quake.taser"], victim.PlayerName); + if (ZShowChat && !string.IsNullOrEmpty(Localizer["chat.quake.taser"])) + { + Helper.AdvancedPrintToChat(attacker, Localizer["chat.quake.taser"], victim.PlayerName); + } } + + if(personData.quakehmessages) + { - if (ZShowCenter && !string.IsNullOrEmpty(Localizer["center.quake.taser"])) + }else { - Server.NextFrame(() => + if (ZShowCenter && !string.IsNullOrEmpty(Localizer["center.quake.taser"])) { - if(Globals.ShowHud_Kill.ContainsKey(attacker.SteamID)) - { - Globals.ShowHud_Kill.Remove(attacker.SteamID); - } - if(!Globals.ShowHud_Kill.ContainsKey(attacker.SteamID)) + Server.NextFrame(() => { - Globals.ShowHud_Kill_Name = victim.PlayerName; - Globals.ShowHud_Kill.Add(attacker.SteamID, Localizer[$"center.quake.taser"]); - } - HUDTimer?.Kill(); - HUDTimer = null; - HUDTimer = AddTimer(ZIntervalHUD, HUDTimer_Callback, TimerFlags.STOP_ON_MAPCHANGE); - }); + if(Globals.ShowHud_Kill.ContainsKey(attacker.SteamID)) + { + Globals.ShowHud_Kill.Remove(attacker.SteamID); + } + if(!Globals.ShowHud_Kill.ContainsKey(attacker.SteamID)) + { + Globals.ShowHud_Kill_Name = victim.PlayerName; + Globals.ShowHud_Kill.Add(attacker.SteamID, Localizer[$"center.quake.taser"]); + } + HUDTimer?.Kill(); + HUDTimer = null; + HUDTimer = AddTimer(ZIntervalHUD, HUDTimer_Callback, TimerFlags.STOP_ON_MAPCHANGE); + }); + } } + } } Globals.lastPlayTimesTaser[playeridattacker] = DateTime.Now; @@ -1426,120 +1851,187 @@ private HookResult OnPlayerDeathQuake(EventPlayerDeath @event, GameEventInfo inf { if(players != null && players.IsValid && !players.IsBot) { - players.ExecuteClientCommand("play " + HsoundPath); + if(personData.quakesounds) + { + + }else + { + players.ExecuteClientCommand("play " + HsoundPath); + } + if(HSteak) { - if (HShowChat && !string.IsNullOrEmpty(Localizer[$"chat.announce.quake.headshot.streak.{numberofkillsHS}"])) + if(personData.quakecmessages) + { + + }else { - Helper.AdvancedPrintToChat(players, Localizer[$"chat.announce.quake.headshot.streak.{numberofkillsHS}"], attacker.PlayerName, numberofkillsHS); + if (HShowChat && !string.IsNullOrEmpty(Localizer[$"chat.announce.quake.headshot.streak.{numberofkillsHS}"])) + { + Helper.AdvancedPrintToChat(players, Localizer[$"chat.announce.quake.headshot.streak.{numberofkillsHS}"], attacker.PlayerName, numberofkillsHS); + } } + + if(personData.quakehmessages) + { - if (HShowCenter && !string.IsNullOrEmpty(Localizer[$"center.announce.quake.headshot.streak.{numberofkillsHS}"])) + }else { - Server.NextFrame(() => + if (HShowCenter && !string.IsNullOrEmpty(Localizer[$"center.announce.quake.headshot.streak.{numberofkillsHS}"])) { - if(Globals.ShowHud_Kill.ContainsKey(players.SteamID)) - { - Globals.ShowHud_Kill.Remove(players.SteamID); - } - if(!Globals.ShowHud_Kill.ContainsKey(players.SteamID)) + Server.NextFrame(() => { - Globals.ShowHud_Kill_Name2 = ""; - Globals.ShowHud_Kill_Name = attacker.PlayerName; - Globals.ShowHud_Kill_int = numberofkillsHS; - Globals.ShowHud_Kill.Add(players.SteamID, Localizer[$"center.announce.quake.headshot.streak.{numberofkillsHS}"]); - } - HUDTimer?.Kill(); - HUDTimer = null; - HUDTimer = AddTimer(HIntervalHUD, HUDTimer_Callback, TimerFlags.STOP_ON_MAPCHANGE); - }); + if(Globals.ShowHud_Kill.ContainsKey(players.SteamID)) + { + Globals.ShowHud_Kill.Remove(players.SteamID); + } + if(!Globals.ShowHud_Kill.ContainsKey(players.SteamID)) + { + Globals.ShowHud_Kill_Name2 = ""; + Globals.ShowHud_Kill_Name = attacker.PlayerName; + Globals.ShowHud_Kill_int = numberofkillsHS; + Globals.ShowHud_Kill.Add(players.SteamID, Localizer[$"center.announce.quake.headshot.streak.{numberofkillsHS}"]); + } + HUDTimer?.Kill(); + HUDTimer = null; + HUDTimer = AddTimer(HIntervalHUD, HUDTimer_Callback, TimerFlags.STOP_ON_MAPCHANGE); + }); + } } + }else { - if (HShowChat && !string.IsNullOrEmpty(Localizer["chat.announce.quake.headshot"])) + if(personData.quakecmessages) + { + + }else { - Helper.AdvancedPrintToChat(players, Localizer["chat.announce.quake.headshot"], attacker.PlayerName, victim.PlayerName); + if (HShowChat && !string.IsNullOrEmpty(Localizer["chat.announce.quake.headshot"])) + { + Helper.AdvancedPrintToChat(players, Localizer["chat.announce.quake.headshot"], attacker.PlayerName, victim.PlayerName); + } } + + if(personData.quakehmessages) + { - if (HShowCenter && !string.IsNullOrEmpty(Localizer["center.announce.quake.headshot"])) + }else { - Server.NextFrame(() => + if (HShowCenter && !string.IsNullOrEmpty(Localizer["center.announce.quake.headshot"])) { - if(Globals.ShowHud_Kill.ContainsKey(players.SteamID)) + Server.NextFrame(() => { - Globals.ShowHud_Kill.Remove(players.SteamID); - } - if(!Globals.ShowHud_Kill.ContainsKey(players.SteamID)) - { - Globals.ShowHud_Kill_Name = attacker.PlayerName; - Globals.ShowHud_Kill_Name2 = victim.PlayerName; - Globals.ShowHud_Kill.Add(players.SteamID, Localizer["center.announce.quake.headshot"]); - } - HUDTimer?.Kill(); - HUDTimer = null; - HUDTimer = AddTimer(HIntervalHUD, HUDTimer_Callback, TimerFlags.STOP_ON_MAPCHANGE); - }); + if(Globals.ShowHud_Kill.ContainsKey(players.SteamID)) + { + Globals.ShowHud_Kill.Remove(players.SteamID); + } + if(!Globals.ShowHud_Kill.ContainsKey(players.SteamID)) + { + Globals.ShowHud_Kill_Name = attacker.PlayerName; + Globals.ShowHud_Kill_Name2 = victim.PlayerName; + Globals.ShowHud_Kill.Add(players.SteamID, Localizer["center.announce.quake.headshot"]); + } + HUDTimer?.Kill(); + HUDTimer = null; + HUDTimer = AddTimer(HIntervalHUD, HUDTimer_Callback, TimerFlags.STOP_ON_MAPCHANGE); + }); + } } + } } }); }else { - attacker.ExecuteClientCommand("play " + HsoundPath); + if(personData.quakesounds) + { + + }else + { + attacker.ExecuteClientCommand("play " + HsoundPath); + } + if(HSteak) { - if (HShowChat && !string.IsNullOrEmpty(Localizer[$"chat.quake.headshot.streak.{numberofkillsHS}"])) + if(personData.quakecmessages) { - Helper.AdvancedPrintToChat(attacker, Localizer[$"chat.quake.headshot.streak.{numberofkillsHS}"], numberofkillsHS); + + }else + { + if (HShowChat && !string.IsNullOrEmpty(Localizer[$"chat.quake.headshot.streak.{numberofkillsHS}"])) + { + Helper.AdvancedPrintToChat(attacker, Localizer[$"chat.quake.headshot.streak.{numberofkillsHS}"], numberofkillsHS); + } } - if (HShowCenter && !string.IsNullOrEmpty(Localizer[$"center.quake.headshot.streak.{numberofkillsHS}"])) + + if(personData.quakehmessages) { - Server.NextFrame(() => + + }else + { + if (HShowCenter && !string.IsNullOrEmpty(Localizer[$"center.quake.headshot.streak.{numberofkillsHS}"])) { - if(Globals.ShowHud_Kill.ContainsKey(attacker.SteamID)) + Server.NextFrame(() => { - Globals.ShowHud_Kill.Remove(attacker.SteamID); - } - if(!Globals.ShowHud_Kill.ContainsKey(attacker.SteamID)) - { - Globals.ShowHud_Kill_Name2 = ""; - Globals.ShowHud_Kill_int = numberofkillsHS; - Globals.ShowHud_Kill_Name = ""; - Globals.ShowHud_Kill.Add(attacker.SteamID, Localizer[$"center.quake.headshot.streak.{numberofkillsHS}"]); - } - HUDTimer?.Kill(); - HUDTimer = null; - HUDTimer = AddTimer(HIntervalHUD, HUDTimer_Callback, TimerFlags.STOP_ON_MAPCHANGE); - }); + if(Globals.ShowHud_Kill.ContainsKey(attacker.SteamID)) + { + Globals.ShowHud_Kill.Remove(attacker.SteamID); + } + if(!Globals.ShowHud_Kill.ContainsKey(attacker.SteamID)) + { + Globals.ShowHud_Kill_Name2 = ""; + Globals.ShowHud_Kill_int = numberofkillsHS; + Globals.ShowHud_Kill_Name = ""; + Globals.ShowHud_Kill.Add(attacker.SteamID, Localizer[$"center.quake.headshot.streak.{numberofkillsHS}"]); + } + HUDTimer?.Kill(); + HUDTimer = null; + HUDTimer = AddTimer(HIntervalHUD, HUDTimer_Callback, TimerFlags.STOP_ON_MAPCHANGE); + }); + } } + }else { - if (HShowChat && !string.IsNullOrEmpty(Localizer["chat.quake.headshot"])) + if(personData.quakecmessages) + { + + }else { - Helper.AdvancedPrintToChat(attacker, Localizer["chat.quake.headshot"], victim.PlayerName); + if (HShowChat && !string.IsNullOrEmpty(Localizer["chat.quake.headshot"])) + { + Helper.AdvancedPrintToChat(attacker, Localizer["chat.quake.headshot"], victim.PlayerName); + } } + + if(personData.quakehmessages) + { - if (HShowCenter && !string.IsNullOrEmpty(Localizer["center.quake.headshot"])) + }else { - Server.NextFrame(() => + if (HShowCenter && !string.IsNullOrEmpty(Localizer["center.quake.headshot"])) { - if(Globals.ShowHud_Kill.ContainsKey(attacker.SteamID)) - { - Globals.ShowHud_Kill.Remove(attacker.SteamID); - } - if(!Globals.ShowHud_Kill.ContainsKey(attacker.SteamID)) + Server.NextFrame(() => { - Globals.ShowHud_Kill_Name = victim.PlayerName; - Globals.ShowHud_Kill.Add(attacker.SteamID, Localizer[$"center.quake.headshot"]); - } - HUDTimer?.Kill(); - HUDTimer = null; - HUDTimer = AddTimer(HIntervalHUD, HUDTimer_Callback, TimerFlags.STOP_ON_MAPCHANGE); - }); + if(Globals.ShowHud_Kill.ContainsKey(attacker.SteamID)) + { + Globals.ShowHud_Kill.Remove(attacker.SteamID); + } + if(!Globals.ShowHud_Kill.ContainsKey(attacker.SteamID)) + { + Globals.ShowHud_Kill_Name = victim.PlayerName; + Globals.ShowHud_Kill.Add(attacker.SteamID, Localizer[$"center.quake.headshot"]); + } + HUDTimer?.Kill(); + HUDTimer = null; + HUDTimer = AddTimer(HIntervalHUD, HUDTimer_Callback, TimerFlags.STOP_ON_MAPCHANGE); + }); + } } + } } Globals.lastPlayTimesHS[playeridattacker] = DateTime.Now; @@ -1584,120 +2076,186 @@ private HookResult OnPlayerDeathQuake(EventPlayerDeath @event, GameEventInfo inf { if(players != null && players.IsValid && !players.IsBot) { - players.ExecuteClientCommand("play " + soundPath); + if(personData.quakesounds) + { + + }else + { + players.ExecuteClientCommand("play " + soundPath); + } + if(KSteak) { - if (KShowChat && !string.IsNullOrEmpty(Localizer[$"chat.announce.quake.kill.streak.{numberofkills}"])) + if(personData.quakecmessages) + { + + }else { - Helper.AdvancedPrintToChat(players, Localizer[$"chat.announce.quake.kill.streak.{numberofkills}"], attacker.PlayerName, numberofkills); + if (KShowChat && !string.IsNullOrEmpty(Localizer[$"chat.announce.quake.kill.streak.{numberofkills}"])) + { + Helper.AdvancedPrintToChat(players, Localizer[$"chat.announce.quake.kill.streak.{numberofkills}"], attacker.PlayerName, numberofkills); + } } + + if(personData.quakehmessages) + { - if (KShowCenter && !string.IsNullOrEmpty(Localizer[$"center.announce.quake.kill.streak.{numberofkills}"])) + }else { - Server.NextFrame(() => + if (KShowCenter && !string.IsNullOrEmpty(Localizer[$"center.announce.quake.kill.streak.{numberofkills}"])) { - if(Globals.ShowHud_Kill.ContainsKey(players.SteamID)) - { - Globals.ShowHud_Kill.Remove(players.SteamID); - } - if(!Globals.ShowHud_Kill.ContainsKey(players.SteamID)) + Server.NextFrame(() => { - Globals.ShowHud_Kill_Name2 = ""; - Globals.ShowHud_Kill_Name = attacker.PlayerName; - Globals.ShowHud_Kill_int = numberofkills; - Globals.ShowHud_Kill.Add(players.SteamID, Localizer[$"center.announce.quake.kill.streak.{numberofkills}"]); - } - HUDTimer?.Kill(); - HUDTimer = null; - HUDTimer = AddTimer(IntervalHUD, HUDTimer_Callback, TimerFlags.STOP_ON_MAPCHANGE); - }); + if(Globals.ShowHud_Kill.ContainsKey(players.SteamID)) + { + Globals.ShowHud_Kill.Remove(players.SteamID); + } + if(!Globals.ShowHud_Kill.ContainsKey(players.SteamID)) + { + Globals.ShowHud_Kill_Name2 = ""; + Globals.ShowHud_Kill_Name = attacker.PlayerName; + Globals.ShowHud_Kill_int = numberofkills; + Globals.ShowHud_Kill.Add(players.SteamID, Localizer[$"center.announce.quake.kill.streak.{numberofkills}"]); + } + HUDTimer?.Kill(); + HUDTimer = null; + HUDTimer = AddTimer(IntervalHUD, HUDTimer_Callback, TimerFlags.STOP_ON_MAPCHANGE); + }); + } } + }else { - if (KShowChat && !string.IsNullOrEmpty(Localizer["chat.announce.quake.kill"])) + if(personData.quakecmessages) + { + + }else { - Helper.AdvancedPrintToChat(players, Localizer["chat.announce.quake.kill"], attacker.PlayerName, victim.PlayerName); + if (KShowChat && !string.IsNullOrEmpty(Localizer["chat.announce.quake.kill"])) + { + Helper.AdvancedPrintToChat(players, Localizer["chat.announce.quake.kill"], attacker.PlayerName, victim.PlayerName); + } } + + if(personData.quakehmessages) + { - if (KShowCenter && !string.IsNullOrEmpty(Localizer["center.announce.quake.kill"])) + }else { - Server.NextFrame(() => + if (KShowCenter && !string.IsNullOrEmpty(Localizer["center.announce.quake.kill"])) { - if(Globals.ShowHud_Kill.ContainsKey(players.SteamID)) + Server.NextFrame(() => { - Globals.ShowHud_Kill.Remove(players.SteamID); - } - if(!Globals.ShowHud_Kill.ContainsKey(players.SteamID)) - { - Globals.ShowHud_Kill_Name = attacker.PlayerName; - Globals.ShowHud_Kill_Name2 = victim.PlayerName; - Globals.ShowHud_Kill.Add(players.SteamID, Localizer["center.announce.quake.kill"]); - } - HUDTimer?.Kill(); - HUDTimer = null; - HUDTimer = AddTimer(IntervalHUD, HUDTimer_Callback, TimerFlags.STOP_ON_MAPCHANGE); - }); + if(Globals.ShowHud_Kill.ContainsKey(players.SteamID)) + { + Globals.ShowHud_Kill.Remove(players.SteamID); + } + if(!Globals.ShowHud_Kill.ContainsKey(players.SteamID)) + { + Globals.ShowHud_Kill_Name = attacker.PlayerName; + Globals.ShowHud_Kill_Name2 = victim.PlayerName; + Globals.ShowHud_Kill.Add(players.SteamID, Localizer["center.announce.quake.kill"]); + } + HUDTimer?.Kill(); + HUDTimer = null; + HUDTimer = AddTimer(IntervalHUD, HUDTimer_Callback, TimerFlags.STOP_ON_MAPCHANGE); + }); + } } + } } }); }else { - attacker.ExecuteClientCommand("play " + soundPath); + if(personData.quakesounds) + { + + }else + { + attacker.ExecuteClientCommand("play " + soundPath); + } + if(KSteak) { - if (KShowChat && !string.IsNullOrEmpty(Localizer[$"chat.quake.kill.streak.{numberofkills}"])) + if(personData.quakecmessages) + { + + }else { - Helper.AdvancedPrintToChat(attacker, Localizer[$"chat.quake.kill.streak.{numberofkills}"], numberofkills); + if (KShowChat && !string.IsNullOrEmpty(Localizer[$"chat.quake.kill.streak.{numberofkills}"])) + { + Helper.AdvancedPrintToChat(attacker, Localizer[$"chat.quake.kill.streak.{numberofkills}"], numberofkills); + } } + + if(personData.quakehmessages) + { - if (KShowCenter && !string.IsNullOrEmpty(Localizer[$"center.quake.kill.streak.{numberofkills}"])) + }else { - Server.NextFrame(() => + if (KShowCenter && !string.IsNullOrEmpty(Localizer[$"center.quake.kill.streak.{numberofkills}"])) { - if(Globals.ShowHud_Kill.ContainsKey(attacker.SteamID)) + Server.NextFrame(() => { - Globals.ShowHud_Kill.Remove(attacker.SteamID); - } - if(!Globals.ShowHud_Kill.ContainsKey(attacker.SteamID)) - { - Globals.ShowHud_Kill_Name2 = ""; - Globals.ShowHud_Kill_int = numberofkills; - Globals.ShowHud_Kill_Name = ""; - Globals.ShowHud_Kill.Add(attacker.SteamID, Localizer[$"center.quake.kill.streak.{numberofkills}"]); - } - HUDTimer?.Kill(); - HUDTimer = null; - HUDTimer = AddTimer(IntervalHUD, HUDTimer_Callback, TimerFlags.STOP_ON_MAPCHANGE); - }); + if(Globals.ShowHud_Kill.ContainsKey(attacker.SteamID)) + { + Globals.ShowHud_Kill.Remove(attacker.SteamID); + } + if(!Globals.ShowHud_Kill.ContainsKey(attacker.SteamID)) + { + Globals.ShowHud_Kill_Name2 = ""; + Globals.ShowHud_Kill_int = numberofkills; + Globals.ShowHud_Kill_Name = ""; + Globals.ShowHud_Kill.Add(attacker.SteamID, Localizer[$"center.quake.kill.streak.{numberofkills}"]); + } + HUDTimer?.Kill(); + HUDTimer = null; + HUDTimer = AddTimer(IntervalHUD, HUDTimer_Callback, TimerFlags.STOP_ON_MAPCHANGE); + }); + } } + }else { - if (KShowChat && !string.IsNullOrEmpty(Localizer["chat.quake.kill"])) + if(personData.quakecmessages) + { + + }else { - Helper.AdvancedPrintToChat(attacker, Localizer["chat.quake.kill"], victim.PlayerName); + if (KShowChat && !string.IsNullOrEmpty(Localizer["chat.quake.kill"])) + { + Helper.AdvancedPrintToChat(attacker, Localizer["chat.quake.kill"], victim.PlayerName); + } } + + if(personData.quakehmessages) + { - if (KShowCenter && !string.IsNullOrEmpty(Localizer["center.quake.kill"])) + }else { - Server.NextFrame(() => + if (KShowCenter && !string.IsNullOrEmpty(Localizer["center.quake.kill"])) { - if(Globals.ShowHud_Kill.ContainsKey(attacker.SteamID)) - { - Globals.ShowHud_Kill.Remove(attacker.SteamID); - } - if(!Globals.ShowHud_Kill.ContainsKey(attacker.SteamID)) + Server.NextFrame(() => { - Globals.ShowHud_Kill_Name = victim.PlayerName; - Globals.ShowHud_Kill.Add(attacker.SteamID, Localizer[$"center.quake.kill"]); - } - HUDTimer?.Kill(); - HUDTimer = null; - HUDTimer = AddTimer(IntervalHUD, HUDTimer_Callback, TimerFlags.STOP_ON_MAPCHANGE); - }); + if(Globals.ShowHud_Kill.ContainsKey(attacker.SteamID)) + { + Globals.ShowHud_Kill.Remove(attacker.SteamID); + } + if(!Globals.ShowHud_Kill.ContainsKey(attacker.SteamID)) + { + Globals.ShowHud_Kill_Name = victim.PlayerName; + Globals.ShowHud_Kill.Add(attacker.SteamID, Localizer[$"center.quake.kill"]); + } + HUDTimer?.Kill(); + HUDTimer = null; + HUDTimer = AddTimer(IntervalHUD, HUDTimer_Callback, TimerFlags.STOP_ON_MAPCHANGE); + }); + } } + } } Globals.lastPlayTimes[playeridattacker] = DateTime.Now; @@ -1720,19 +2278,22 @@ private HookResult OnRoundStart(EventRoundStart @event, GameEventInfo info) { Globals.Timers.Stop(); } - - Globals.Kill_Streak.Clear(); - Globals.Kill_StreakHS.Clear(); - Globals.Kill_Knife.Clear(); - Globals.Kill_Nade.Clear(); - Globals.Kill_Molly.Clear(); - Globals.Kill_Taser.Clear(); - Globals.lastPlayTimes.Clear(); - Globals.lastPlayTimesHS.Clear(); - Globals.lastPlayTimesKnife.Clear(); - Globals.lastPlayTimesNade.Clear(); - Globals.lastPlayTimesMolly.Clear(); - Globals.lastPlayTimesTaser.Clear(); + + if(Configs.GetConfigData().KS_ResetKillStreakOnEveryRound) + { + Globals.Kill_Streak.Clear(); + Globals.Kill_StreakHS.Clear(); + Globals.Kill_Knife.Clear(); + Globals.Kill_Nade.Clear(); + Globals.Kill_Molly.Clear(); + Globals.Kill_Taser.Clear(); + Globals.lastPlayTimes.Clear(); + Globals.lastPlayTimesHS.Clear(); + Globals.lastPlayTimesKnife.Clear(); + Globals.lastPlayTimesNade.Clear(); + Globals.lastPlayTimesMolly.Clear(); + Globals.lastPlayTimesTaser.Clear(); + } Globals.ShowHud_Kill.Clear(); try @@ -1759,30 +2320,51 @@ private HookResult OnRoundStart(EventRoundStart @event, GameEventInfo info) { if(players != null && players.IsValid && !players.IsBot) { - players.ExecuteClientCommand("play " + PsoundPath); - if (PShowChat && !string.IsNullOrEmpty(Localizer["chat.announce.quake.roundprepare"])) + var playerid = players.SteamID; + Helper.PersonData personData = Helper.RetrievePersonDataById(playerid); + if(personData.quakesounds) { - Helper.AdvancedPrintToChat(players, Localizer["chat.announce.quake.roundprepare"]); + + }else + { + players.ExecuteClientCommand("play " + PsoundPath); } + if(personData.quakecmessages) + { - if (PShowCenter && !string.IsNullOrEmpty(Localizer["center.announce.quake.roundprepare"])) + }else { - Server.NextFrame(() => + if (PShowChat && !string.IsNullOrEmpty(Localizer["chat.announce.quake.roundprepare"])) { - if(Globals.ShowHud_Kill.ContainsKey(players.SteamID)) - { - Globals.ShowHud_Kill.Remove(players.SteamID); - } - if(!Globals.ShowHud_Kill.ContainsKey(players.SteamID)) + Helper.AdvancedPrintToChat(players, Localizer["chat.announce.quake.roundprepare"]); + } + } + + if(personData.quakehmessages) + { + + }else + { + if (PShowCenter && !string.IsNullOrEmpty(Localizer["center.announce.quake.roundprepare"])) + { + Server.NextFrame(() => { - Globals.ShowHud_Kill.Add(players.SteamID, Localizer["center.announce.quake.roundprepare"]); - } - HUDTimer?.Kill(); - HUDTimer = null; - HUDTimer = AddTimer(PIntervalHUD, HUDTimer_Callback, TimerFlags.STOP_ON_MAPCHANGE); - }); + if(Globals.ShowHud_Kill.ContainsKey(players.SteamID)) + { + Globals.ShowHud_Kill.Remove(players.SteamID); + } + if(!Globals.ShowHud_Kill.ContainsKey(players.SteamID)) + { + Globals.ShowHud_Kill.Add(players.SteamID, Localizer["center.announce.quake.roundprepare"]); + } + HUDTimer?.Kill(); + HUDTimer = null; + HUDTimer = AddTimer(PIntervalHUD, HUDTimer_Callback, TimerFlags.STOP_ON_MAPCHANGE); + }); + } } + } }); } @@ -1969,29 +2551,51 @@ public void OnTick() { if(players != null && players.IsValid && !players.IsBot) { - players.ExecuteClientCommand("play " + RsoundPath); - if (RShowChat && !string.IsNullOrEmpty(Localizer["chat.announce.quake.roundstart"])) - { - Helper.AdvancedPrintToChat(players, Localizer["chat.announce.quake.roundstart"]); - } + var playerid = players.SteamID; + Helper.PersonData personData = Helper.RetrievePersonDataById(playerid); + if(personData.quakesounds) + { - if (RShowCenter && !string.IsNullOrEmpty(Localizer["center.announce.quake.roundstart"])) - { - Server.NextFrame(() => - { - if(Globals.ShowHud_Kill.ContainsKey(players.SteamID)) - { - Globals.ShowHud_Kill.Remove(players.SteamID); - } - if(!Globals.ShowHud_Kill.ContainsKey(players.SteamID)) - { - Globals.ShowHud_Kill.Add(players.SteamID, Localizer["center.announce.quake.roundstart"]); - } - HUDTimer?.Kill(); - HUDTimer = null; - HUDTimer = AddTimer(RIntervalHUD, HUDTimer_Callback, TimerFlags.STOP_ON_MAPCHANGE); - }); - } + }else + { + players.ExecuteClientCommand("play " + RsoundPath); + } + + if(personData.quakecmessages) + { + + }else + { + if (RShowChat && !string.IsNullOrEmpty(Localizer["chat.announce.quake.roundstart"])) + { + Helper.AdvancedPrintToChat(players, Localizer["chat.announce.quake.roundstart"]); + } + } + + if(personData.quakehmessages) + { + + }else + { + if (RShowCenter && !string.IsNullOrEmpty(Localizer["center.announce.quake.roundstart"])) + { + Server.NextFrame(() => + { + if(Globals.ShowHud_Kill.ContainsKey(players.SteamID)) + { + Globals.ShowHud_Kill.Remove(players.SteamID); + } + if(!Globals.ShowHud_Kill.ContainsKey(players.SteamID)) + { + Globals.ShowHud_Kill.Add(players.SteamID, Localizer["center.announce.quake.roundstart"]); + } + HUDTimer?.Kill(); + HUDTimer = null; + HUDTimer = AddTimer(RIntervalHUD, HUDTimer_Callback, TimerFlags.STOP_ON_MAPCHANGE); + }); + } + } + } }); } @@ -2034,7 +2638,7 @@ public void OnTick() List MenuSetupList = new List(); List boolValuesList = new List(); - if (!string.IsNullOrEmpty(Configs.GetConfigData().KS_BodyHitSoundPath)) + if (Configs.GetConfigData().KS_AddMenu_FreezeOnOpenMenu) { MenuSetupList.Add(Localizer["menu.item.freeze"]); if(Configs.GetConfigData().KS_FreezeOnOpenMenuDefaultValue) @@ -2046,7 +2650,7 @@ public void OnTick() } } - if (!string.IsNullOrEmpty(Configs.GetConfigData().KS_BodyHitSoundPath)) + if (!string.IsNullOrEmpty(Configs.GetConfigData().KS_AddMenu_BodyHitSoundPath)) { MenuSetupList.Add(Localizer["menu.item.bodyhit"]); if(Configs.GetConfigData().KS_BodyHitSoundDefaultValue) @@ -2058,7 +2662,7 @@ public void OnTick() } } - if (!string.IsNullOrEmpty(Configs.GetConfigData().KS_BodyKillSoundPath)) + if (!string.IsNullOrEmpty(Configs.GetConfigData().KS_AddMenu_BodyKillSoundPath)) { MenuSetupList.Add(Localizer["menu.item.bodykill"]); if(Configs.GetConfigData().KS_BodyKillSoundDefaultValue) @@ -2070,7 +2674,7 @@ public void OnTick() } } - if (!string.IsNullOrEmpty(Configs.GetConfigData().KS_HeadShotHitSoundPath)) + if (!string.IsNullOrEmpty(Configs.GetConfigData().KS_AddMenu_HeadShotHitSoundPath)) { MenuSetupList.Add(Localizer["menu.item.headshothit"]); @@ -2083,7 +2687,7 @@ public void OnTick() } } - if (!string.IsNullOrEmpty(Configs.GetConfigData().KS_HeadShotKillSoundPath)) + if (!string.IsNullOrEmpty(Configs.GetConfigData().KS_AddMenu_HeadShotKillSoundPath)) { MenuSetupList.Add(Localizer["menu.item.headshotkill"]); if(Configs.GetConfigData().KS_HeadShotKillSoundDefaultValue) @@ -2095,6 +2699,22 @@ public void OnTick() } } + + if (Configs.GetConfigData().KS_AddMenu_QuakeSoundsToggle) + { + MenuSetupList.Add(Localizer["menu.item.quake.sounds"]); + boolValuesList.Add(personData.quakesounds); + } + if (Configs.GetConfigData().KS_AddMenu_QuakeCenterMessageToggle) + { + MenuSetupList.Add(Localizer["menu.item.quake.center.messages"]); + boolValuesList.Add(personData.quakehmessages); + } + if (Configs.GetConfigData().KS_AddMenu_QuakeChatMessageToggle) + { + MenuSetupList.Add(Localizer["menu.item.quake.chat.messages"]); + boolValuesList.Add(personData.quakecmessages); + } string[] MenuSetup = MenuSetupList.ToArray(); bool[] boolValues = boolValuesList.ToArray(); @@ -2130,7 +2750,7 @@ public void OnTick() Globals.currentIndexDict[playerid] = currentIndex; player.ExecuteClientCommand("play sounds/ui/csgo_ui_contract_type4.vsnd_c"); Globals.buttonPressed[playerid] = true; - }else if ((player.Buttons == PlayerButtons.Moveleft || player.Buttons == PlayerButtons.Moveright) && !Globals.buttonPressed[playerid]) + }else if ((player.Buttons == PlayerButtons.Moveleft || player.Buttons == PlayerButtons.Moveright) && !Globals.buttonPressed[playerid] && ((PlayerFlags)player.Pawn.Value!.Flags & PlayerFlags.FL_ONGROUND) == PlayerFlags.FL_ONGROUND) { int currentLineIndex = Globals.currentIndexDict[playerid]; string currentLineName = MenuSetup[currentLineIndex]; @@ -2189,7 +2809,7 @@ public void OnTick() } } - Helper.SaveToJsonFile(playerid, personData.freezemenu, personData.headshotkill, personData.headshothit, personData.bodyshotkill, personData.bodyshothit, personDate); + Helper.SaveToJsonFile(playerid, personData.freezemenu, personData.headshotkill, personData.headshothit, personData.bodyshotkill, personData.bodyshothit,personData.quakesounds,personData.quakehmessages,personData.quakecmessages, personDate); } else if (currentLineName == Localizer["menu.item.bodyhit"]) { @@ -2227,7 +2847,7 @@ public void OnTick() } } - Helper.SaveToJsonFile(playerid, personData.freezemenu, personData.headshotkill, personData.headshothit, personData.bodyshotkill, personData.bodyshothit, personDate); + Helper.SaveToJsonFile(playerid, personData.freezemenu, personData.headshotkill, personData.headshothit, personData.bodyshotkill, personData.bodyshothit,personData.quakesounds,personData.quakehmessages,personData.quakecmessages, personDate); } else if (currentLineName == Localizer["menu.item.bodykill"]) { @@ -2264,7 +2884,7 @@ public void OnTick() } } } - Helper.SaveToJsonFile(playerid, personData.freezemenu, personData.headshotkill, personData.headshothit, personData.bodyshotkill, personData.bodyshothit, personDate); + Helper.SaveToJsonFile(playerid, personData.freezemenu, personData.headshotkill, personData.headshothit, personData.bodyshotkill, personData.bodyshothit,personData.quakesounds,personData.quakehmessages,personData.quakecmessages, personDate); } else if (currentLineName == Localizer["menu.item.headshothit"]) { @@ -2301,7 +2921,7 @@ public void OnTick() } } } - Helper.SaveToJsonFile(playerid, personData.freezemenu, personData.headshotkill, personData.headshothit, personData.bodyshotkill, personData.bodyshothit, personDate); + Helper.SaveToJsonFile(playerid, personData.freezemenu, personData.headshotkill, personData.headshothit, personData.bodyshotkill, personData.bodyshothit,personData.quakesounds,personData.quakehmessages,personData.quakecmessages, personDate); } else if (currentLineName == Localizer["menu.item.headshotkill"]) { @@ -2338,7 +2958,64 @@ public void OnTick() } } } - Helper.SaveToJsonFile(playerid, personData.freezemenu, personData.headshotkill, personData.headshothit, personData.bodyshotkill, personData.bodyshothit, personDate); + Helper.SaveToJsonFile(playerid, personData.freezemenu, personData.headshotkill, personData.headshothit, personData.bodyshotkill, personData.bodyshothit,personData.quakesounds,personData.quakehmessages,personData.quakecmessages, personDate); + } + else if (currentLineName == Localizer["menu.item.quake.sounds"]) + { + personData.quakesounds = !personData.quakesounds; + if(personData.quakesounds) + { + if (!string.IsNullOrEmpty(Localizer["player.toggle.quake.sounds.off"])) + { + Helper.AdvancedPrintToChat(player, Localizer["player.toggle.quake.sounds.off"]); + } + }else + { + + if (!string.IsNullOrEmpty(Localizer["player.toggle.quake.sounds.on"])) + { + Helper.AdvancedPrintToChat(player, Localizer["player.toggle.quake.sounds.on"]); + } + } + Helper.SaveToJsonFile(playerid, personData.freezemenu, personData.headshotkill, personData.headshothit, personData.bodyshotkill, personData.bodyshothit,personData.quakesounds,personData.quakehmessages,personData.quakecmessages, personDate); + } + else if (currentLineName == Localizer["menu.item.quake.center.messages"]) + { + personData.quakehmessages = !personData.quakehmessages; + if(personData.quakehmessages) + { + if (!string.IsNullOrEmpty(Localizer["player.toggle.quake.center.message.off"])) + { + Helper.AdvancedPrintToChat(player, Localizer["player.toggle.quake.center.message.off"]); + } + }else + { + + if (!string.IsNullOrEmpty(Localizer["player.toggle.quake.center.message.on"])) + { + Helper.AdvancedPrintToChat(player, Localizer["player.toggle.quake.center.message.on"]); + } + } + Helper.SaveToJsonFile(playerid, personData.freezemenu, personData.headshotkill, personData.headshothit, personData.bodyshotkill, personData.bodyshothit,personData.quakesounds,personData.quakehmessages,personData.quakecmessages, personDate); + } + else if (currentLineName == Localizer["menu.item.quake.chat.messages"]) + { + personData.quakecmessages = !personData.quakecmessages; + if(personData.quakecmessages) + { + if (!string.IsNullOrEmpty(Localizer["player.toggle.quake.chat.message.off"])) + { + Helper.AdvancedPrintToChat(player, Localizer["player.toggle.quake.chat.message.off"]); + } + }else + { + + if (!string.IsNullOrEmpty(Localizer["player.toggle.quake.chat.message.on"])) + { + Helper.AdvancedPrintToChat(player, Localizer["player.toggle.quake.chat.message.on"]); + } + } + Helper.SaveToJsonFile(playerid, personData.freezemenu, personData.headshotkill, personData.headshothit, personData.bodyshotkill, personData.bodyshothit,personData.quakesounds,personData.quakehmessages,personData.quakecmessages, personDate); } player.ExecuteClientCommand("play sounds/ui/item_sticker_select.vsnd_c"); @@ -2384,13 +3061,14 @@ public void OnTick() } else { - string lineHtml = $"{currentMenuOption}
"; + string statusText = status ? "Off" : "On"; + string lineHtml = $" {currentMenuOption} : {statusText}
"; builder.AppendLine(lineHtml); } } if (startIndex + visibleOptions < MenuSetup.Length) { - string moreItemsIndicator = "ꜜ↓ꜜ"; + string moreItemsIndicator = Localizer["menu.more.down"]; builder.AppendLine(moreItemsIndicator); } builder.AppendLine("
" + BottomMenu); diff --git a/lang/en.json b/lang/en.json index 8556350..920c1ff 100644 --- a/lang/en.json +++ b/lang/en.json @@ -1,4 +1,3 @@ - { "player.not.allowed": "{green}Gold KingZ {grey}| {darkred}Toggle Sounds Menu Is For {lime}VIPS {darkred}Only", @@ -18,6 +17,15 @@ "player.toggle.headshothit.on": "{green}Gold KingZ {grey}| {grey}HeadShot Hit Sound Is {lime}On", "player.toggle.headshothit.off": "{green}Gold KingZ {grey}| {grey}HeadShot Hit Sound Is {darkred}Off", + "player.toggle.quake.sounds.on": "{green}Gold KingZ {grey}| {grey}Quake Sounds Is {lime}On", + "player.toggle.quake.sounds.off": "{green}Gold KingZ {grey}| {grey}Quake Sounds Is {darkred}Off", + + "player.toggle.quake.center.message.on": "{green}Gold KingZ {grey}| {grey}Quake Center Messages Is {lime}On", + "player.toggle.quake.center.message.off": "{green}Gold KingZ {grey}| {grey}Quake Center Messages Is {darkred}Off", + + "player.toggle.quake.chat.message.on": "{green}Gold KingZ {grey}| {grey}Quake Chat Messages Is {lime}On", + "player.toggle.quake.chat.message.off": "{green}Gold KingZ {grey}| {grey}Quake Chat Messages Is {darkred}Off", + "chat.announce.quake.headshot.streak.5": "{green}Gold KingZ {grey}| {purple}{0} {grey}IS HEAD HUNTER!!! Got {yellow}{1} {grey}HeadShot Streak!", "center.announce.quake.headshot.streak.5": "{0} IS HEAD HUNTER!!! Got {1} HeadShot Streak! ", @@ -76,15 +84,18 @@ "chat.announce.quake.roundstart": "{green}Gold KingZ {grey}| {lime}Round Start !", "center.announce.quake.roundstart": "Round Start !!! ", - - + "menu.item.freeze": "Freeze Open Menu", "menu.item.bodyhit": "Body Hit Sound", "menu.item.bodykill": "Body Kill Sound", "menu.item.headshothit": "HeadShot Hit Sound", "menu.item.headshotkill": "HeadShot Kill Sound", + "menu.item.quake.sounds": "Quake Sounds", + "menu.item.quake.center.messages": "Quake Center Message", + "menu.item.quake.chat.messages": "Quake Chat Message", "menu.left.image": "", "menu.right.image": "", + "menu.more.down": " ", "menu.bottom": " [ WASD - To Native ]
[ - To Exit ]
" -} +} \ No newline at end of file