diff --git a/Config/Configs.cs b/Config/Configs.cs index a21a4ec..edc256d 100644 --- a/Config/Configs.cs +++ b/Config/Configs.cs @@ -116,6 +116,7 @@ public int VoteKick_Mode public string VoteKick_CommandsOnHalfVoteAccept { get; set; } public string VoteKick_CommandsOnHalfVoteRefuse { get; set; } public string VoteKick_ImmunityGroups { get; set; } + public string VoteKick_DisableItOnJoinTheseGroups { get; set; } public string empty { get; set; } @@ -152,6 +153,7 @@ public int VoteBanned_Mode public string VoteBanned_CommandsOnHalfVoteAccept { get; set; } public string VoteBanned_CommandsOnHalfVoteRefuse { get; set; } public string VoteBanned_ImmunityGroups { get; set; } + public string VoteBanned_DisableItOnJoinTheseGroups { get; set; } public string empty2 { get; set; } public bool VoteMute { get; set; } @@ -168,6 +170,7 @@ public int VoteBanned_Mode public string VoteMute_CommandsOnHalfVoteAccept { get; set; } public string VoteMute_CommandsOnHalfVoteRefuse { get; set; } public string VoteMute_ImmunityGroups { get; set; } + public string VoteMute_DisableItOnJoinTheseGroups { get; set; } public string empty3 { get; set; } @@ -220,7 +223,7 @@ public ConfigData() VoteKick_StartOnMinimumOfXPlayers = 5; VoteKick_AllowKickedPlayersToJoinOnMapChange = false; VoteKick_TeamOnly = false; - VoteKick_Percentage = 6; + VoteKick_Percentage = 60; VoteKick_CenterMessageAnnouncementOnHalfVotes = false; VoteKick_CenterMessageAnnouncementTimer = 25; VoteKick_EvasionPunishment = false; @@ -230,12 +233,13 @@ public ConfigData() VoteKick_CommandsOnHalfVoteAccept = "!yes,yes,!y,y"; VoteKick_CommandsOnHalfVoteRefuse = "!no,no,!n,n"; VoteKick_ImmunityGroups = "@css/root,@css/admin,@css/vip,#css/admin,#css/vip"; + VoteKick_DisableItOnJoinTheseGroups = ""; empty = "-----------------------------------------------------------------------------------"; VoteBanned_Mode = 0; VoteBanned_TimeInDays = 1; VoteBanned_StartOnMinimumOfXPlayers = 8; VoteBanned_TeamOnly = false; - VoteBanned_Percentage = 8; + VoteBanned_Percentage = 80; VoteBanned_CenterMessageAnnouncementOnHalfVotes = false; VoteBanned_CenterMessageAnnouncementTimer = 25; VoteBanned_EvasionPunishment = false; @@ -245,13 +249,14 @@ public ConfigData() VoteBanned_CommandsOnHalfVoteAccept = "!yes,yes,!y,y"; VoteBanned_CommandsOnHalfVoteRefuse = "!no,no,!n,n"; VoteBanned_ImmunityGroups = "@css/root,@css/admin,@css/vip,#css/admin,#css/vip"; + VoteBanned_DisableItOnJoinTheseGroups = ""; empty2 = "-----------------------------------------------------------------------------------"; VoteMute = false; VoteMute_TimeInMins = 5; VoteMute_StartOnMinimumOfXPlayers = 5; VoteMute_RemoveMutedPlayersOnMapChange = false; VoteMute_TeamOnly = false; - VoteMute_Percentage = 7; + VoteMute_Percentage = 60; VoteMute_CenterMessageAnnouncementOnHalfVotes = false; VoteMute_CenterMessageAnnouncementTimer = 25; VoteMute_EvasionPunishment = false; @@ -260,6 +265,7 @@ public ConfigData() VoteMute_CommandsOnHalfVoteAccept = "!yes,yes,!y,y"; VoteMute_CommandsOnHalfVoteRefuse = "!no,no,!n,n"; VoteMute_ImmunityGroups = "@css/root,@css/admin,@css/vip,#css/admin,#css/vip"; + VoteMute_DisableItOnJoinTheseGroups = ""; empty3 = "-----------------------------------------------------------------------------------"; Log_SendLogToText = false; Log_TextMessageFormat = "[{DATE} - {TIME}] {PLAYERNAME} Has Been ({REASON}) [SteamID: {STEAMID} - Ip: {IP}]"; diff --git a/Vote Banned/VoteBanned.cs b/Vote Banned/VoteBanned.cs index 06032af..6252e3e 100644 --- a/Vote Banned/VoteBanned.cs +++ b/Vote Banned/VoteBanned.cs @@ -807,9 +807,9 @@ private void HandleMenuCT(CCSPlayerController Caller, ChatMenuOption option, int string[] parts = GetTargerIP!.Split(':'); string TargerIP = parts[0]; - double xPercentage = Configs.GetConfigData().VoteBanned_Percentage / 10.0; - var CountCT = Helper.GetCounterTerroristCount(); - var requiredct = (int)Math.Ceiling(CountCT * xPercentage); + var allCTPlayers = Helper.GetCounterTerroristCount(); + float percentage = Configs.GetConfigData().VoteBanned_Percentage; + int requiredct = (int)Math.Ceiling(allCTPlayers * (percentage / 100.0f)); if (!string.IsNullOrEmpty(Configs.GetConfigData().VoteBanned_ImmunityGroups) && Globals_VoteBanned.VoteBanned_Immunity.ContainsKey(TargetPlayerSteamID)) { @@ -985,9 +985,9 @@ private void HandleMenuT(CCSPlayerController Caller, ChatMenuOption option, int string[] parts = GetTargerIP!.Split(':'); string TargerIP = parts[0]; - double xPercentage = Configs.GetConfigData().VoteBanned_Percentage / 10.0; - var CountT = Helper.GetTerroristCount(); - var requiredt = (int)Math.Ceiling(CountT * xPercentage); + var allTPlayers = Helper.GetTerroristCount(); + float percentage = Configs.GetConfigData().VoteBanned_Percentage; + int requiredt = (int)Math.Ceiling(allTPlayers * (percentage / 100.0f)); if (!string.IsNullOrEmpty(Configs.GetConfigData().VoteBanned_ImmunityGroups) && Globals_VoteBanned.VoteBanned_Immunity.ContainsKey(TargetPlayerSteamID)) { @@ -1167,9 +1167,9 @@ private void HandleMenuALL(CCSPlayerController Caller, ChatMenuOption option, in string[] parts = GetTargerIP!.Split(':'); string TargerIP = parts[0]; - double xPercentage = Configs.GetConfigData().VoteBanned_Percentage / 10.0; - var Countall = Helper.GetAllCount(); - var requiredall = (int)Math.Ceiling(Countall * xPercentage); + var allPlayers = Helper.GetAllCount(); + float percentage = Configs.GetConfigData().VoteBanned_Percentage; + int requiredall = (int)Math.Ceiling(allPlayers * (percentage / 100.0f)); if (!string.IsNullOrEmpty(Configs.GetConfigData().VoteBanned_ImmunityGroups) && Globals_VoteBanned.VoteBanned_Immunity.ContainsKey(TargetPlayerSteamID)) { diff --git a/Vote Kick/VoteKick.cs b/Vote Kick/VoteKick.cs index 5c5ff9d..98f5aed 100644 --- a/Vote Kick/VoteKick.cs +++ b/Vote Kick/VoteKick.cs @@ -800,10 +800,10 @@ private void HandleMenuCT(CCSPlayerController Caller, ChatMenuOption option, int string[] parts = GetTargerIP!.Split(':'); string TargerIP = parts[0]; - double xPercentage = Configs.GetConfigData().VoteKick_Percentage / 10.0; - var CountCT = Helper.GetCounterTerroristCount(); - var requiredct = (int)Math.Ceiling(CountCT * xPercentage); - + var allCTPlayers = Helper.GetCounterTerroristCount(); + float percentage = Configs.GetConfigData().VoteKick_Percentage; + int requiredct = (int)Math.Ceiling(allCTPlayers * (percentage / 100.0f)); + if (!string.IsNullOrEmpty(Configs.GetConfigData().VoteKick_ImmunityGroups) && Globals_VoteKick.VoteKick_Immunity.ContainsKey(TargetPlayerSteamID)) { if (!string.IsNullOrEmpty(Localizer!["votekick.player.is.immunity"])) @@ -981,9 +981,9 @@ private void HandleMenuT(CCSPlayerController Caller, ChatMenuOption option, int string[] parts = GetTargerIP!.Split(':'); string TargerIP = parts[0]; - double xPercentage = Configs.GetConfigData().VoteKick_Percentage / 10.0; - var CountT = Helper.GetTerroristCount(); - var requiredt = (int)Math.Ceiling(CountT * xPercentage); + var allTPlayers = Helper.GetTerroristCount(); + float percentage = Configs.GetConfigData().VoteKick_Percentage; + int requiredt = (int)Math.Ceiling(allTPlayers * (percentage / 100.0f)); if (!string.IsNullOrEmpty(Configs.GetConfigData().VoteKick_ImmunityGroups) && Globals_VoteKick.VoteKick_Immunity.ContainsKey(TargetPlayerSteamID)) { @@ -1162,9 +1162,9 @@ private void HandleMenuALL(CCSPlayerController Caller, ChatMenuOption option, in string[] parts = GetTargerIP!.Split(':'); string TargerIP = parts[0]; - double xPercentage = Configs.GetConfigData().VoteKick_Percentage / 10.0; - var Countall = Helper.GetAllCount(); - var requiredall = (int)Math.Ceiling(Countall * xPercentage); + var allPlayers = Helper.GetAllCount(); + float percentage = Configs.GetConfigData().VoteKick_Percentage; + int requiredall = (int)Math.Ceiling(allPlayers * (percentage / 100.0f)); if (!string.IsNullOrEmpty(Configs.GetConfigData().VoteKick_ImmunityGroups) && Globals_VoteKick.VoteKick_Immunity.ContainsKey(TargetPlayerSteamID)) { diff --git a/Vote Mute/VoteMute.cs b/Vote Mute/VoteMute.cs index 67a78b7..6a95a70 100644 --- a/Vote Mute/VoteMute.cs +++ b/Vote Mute/VoteMute.cs @@ -724,9 +724,9 @@ private void HandleMenuCT(CCSPlayerController Caller, ChatMenuOption option, int string[] parts = GetTargerIP!.Split(':'); string TargerIP = parts[0]; - double xPercentage = Configs.GetConfigData().VoteMute_Percentage / 10.0; - var CountCT = Helper.GetCounterTerroristCount(); - var requiredct = (int)Math.Ceiling(CountCT * xPercentage); + var allCTPlayers = Helper.GetCounterTerroristCount(); + float percentage = Configs.GetConfigData().VoteMute_Percentage; + int requiredct = (int)Math.Ceiling(allCTPlayers * (percentage / 100.0f)); if (!string.IsNullOrEmpty(Configs.GetConfigData().VoteMute_ImmunityGroups) && Globals_VoteMute.VoteMute_Immunity.ContainsKey(TargetPlayerSteamID)) { @@ -919,9 +919,9 @@ private void HandleMenuT(CCSPlayerController Caller, ChatMenuOption option, int string[] parts = GetTargerIP!.Split(':'); string TargerIP = parts[0]; - double xPercentage = Configs.GetConfigData().VoteMute_Percentage / 10.0; - var CountT = Helper.GetTerroristCount(); - var requiredt = (int)Math.Ceiling(CountT * xPercentage); + var allTPlayers = Helper.GetTerroristCount(); + float percentage = Configs.GetConfigData().VoteMute_Percentage; + int requiredt = (int)Math.Ceiling(allTPlayers * (percentage / 100.0f)); if (!string.IsNullOrEmpty(Configs.GetConfigData().VoteMute_ImmunityGroups) && Globals_VoteMute.VoteMute_Immunity.ContainsKey(TargetPlayerSteamID)) { @@ -1112,9 +1112,9 @@ private void HandleMenuALL(CCSPlayerController Caller, ChatMenuOption option, in string[] parts = GetTargerIP!.Split(':'); string TargerIP = parts[0]; - double xPercentage = Configs.GetConfigData().VoteMute_Percentage / 10.0; - var Countall = Helper.GetAllCount(); - var requiredall = (int)Math.Ceiling(Countall * xPercentage); + var allPlayers = Helper.GetAllCount(); + float percentage = Configs.GetConfigData().VoteMute_Percentage; + int requiredall = (int)Math.Ceiling(allPlayers * (percentage / 100.0f)); if (!string.IsNullOrEmpty(Configs.GetConfigData().VoteMute_ImmunityGroups) && Globals_VoteMute.VoteMute_Immunity.ContainsKey(TargetPlayerSteamID)) { diff --git a/Vote-GoldKingZ.cs b/Vote-GoldKingZ.cs index b650bae..b73e456 100644 --- a/Vote-GoldKingZ.cs +++ b/Vote-GoldKingZ.cs @@ -13,7 +13,7 @@ namespace Vote_GoldKingZ; public class VoteGoldKingZ : BasePlugin { public override string ModuleName => "Vote (Kick , Mute , Banned, Vips)"; - public override string ModuleVersion => "1.0.5"; + public override string ModuleVersion => "1.0.6"; public override string ModuleAuthor => "Gold KingZ"; public override string ModuleDescription => "https://github.com/oqyh";