Skip to content

Commit

Permalink
1.0.6
Browse files Browse the repository at this point in the history
  • Loading branch information
oqyh committed Mar 28, 2024
1 parent 60ce6a0 commit 9b1657c
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 32 deletions.
12 changes: 9 additions & 3 deletions Config/Configs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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; }


Expand Down Expand Up @@ -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; }
Expand All @@ -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; }
Expand Down Expand Up @@ -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;
Expand All @@ -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;
Expand All @@ -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;
Expand All @@ -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}]";
Expand Down
18 changes: 9 additions & 9 deletions Vote Banned/VoteBanned.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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))
{
Expand Down Expand Up @@ -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))
{
Expand Down Expand Up @@ -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))
{
Expand Down
20 changes: 10 additions & 10 deletions Vote Kick/VoteKick.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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"]))
Expand Down Expand Up @@ -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))
{
Expand Down Expand Up @@ -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))
{
Expand Down
18 changes: 9 additions & 9 deletions Vote Mute/VoteMute.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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))
{
Expand Down Expand Up @@ -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))
{
Expand Down Expand Up @@ -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))
{
Expand Down
2 changes: 1 addition & 1 deletion Vote-GoldKingZ.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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";

Expand Down

0 comments on commit 9b1657c

Please sign in to comment.