Skip to content

Commit

Permalink
1.0.7
Browse files Browse the repository at this point in the history
  • Loading branch information
oqyh authored Mar 30, 2024
1 parent 9b1657c commit 60a494d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions Helper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -76,30 +76,30 @@ public static bool IsPlayerInGroupPermission(CCSPlayerController player, string
}
public static List<CCSPlayerController> GetCounterTerroristController()
{
var playerList = Utilities.FindAllEntitiesByDesignerName<CCSPlayerController>("cs_player_controller").Where(p => p != null && p.IsValid && p.Team == CsTeam.CounterTerrorist).ToList();
var playerList = Utilities.FindAllEntitiesByDesignerName<CCSPlayerController>("cs_player_controller").Where(p => p != null && p.IsValid && !p.IsHLTV && p.Connected == PlayerConnectedState.PlayerConnected && p.Team == CsTeam.CounterTerrorist).ToList();
return playerList;
}
public static List<CCSPlayerController> GetTerroristController()
{
var playerList = Utilities.FindAllEntitiesByDesignerName<CCSPlayerController>("cs_player_controller").Where(p => p != null && p.IsValid && p.Team == CsTeam.Terrorist).ToList();
var playerList = Utilities.FindAllEntitiesByDesignerName<CCSPlayerController>("cs_player_controller").Where(p => p != null && p.IsValid && !p.IsHLTV && p.Connected == PlayerConnectedState.PlayerConnected && p.Team == CsTeam.Terrorist).ToList();
return playerList;
}
public static List<CCSPlayerController> GetAllController()
{
var playerList = Utilities.FindAllEntitiesByDesignerName<CCSPlayerController>("cs_player_controller").Where(p => p != null && p.IsValid).ToList();
var playerList = Utilities.FindAllEntitiesByDesignerName<CCSPlayerController>("cs_player_controller").Where(p => p != null && p.IsValid && !p.IsHLTV && p.Connected == PlayerConnectedState.PlayerConnected).ToList();
return playerList;
}
public static int GetCounterTerroristCount()
{
return Utilities.GetPlayers().Count(p => p.TeamNum == (byte)CsTeam.CounterTerrorist && !p.IsHLTV);
return Utilities.GetPlayers().Count(p => p != null && p.IsValid && !p.IsHLTV && p.Connected == PlayerConnectedState.PlayerConnected && p.TeamNum == (byte)CsTeam.CounterTerrorist);
}
public static int GetTerroristCount()
{
return Utilities.GetPlayers().Count(p => p.TeamNum == (byte)CsTeam.Terrorist && !p.IsHLTV);
return Utilities.GetPlayers().Count(p => p != null && p.IsValid && !p.IsHLTV && p.Connected == PlayerConnectedState.PlayerConnected && p.TeamNum == (byte)CsTeam.Terrorist);
}
public static int GetAllCount()
{
return Utilities.GetPlayers().Count(p => !p.IsHLTV);
return Utilities.GetPlayers().Count(p => p != null && p.IsValid && !p.IsHLTV && p.Connected == PlayerConnectedState.PlayerConnected);
}

public static void ClearVariablesVoteKick()
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.6";
public override string ModuleVersion => "1.0.7";
public override string ModuleAuthor => "Gold KingZ";
public override string ModuleDescription => "https://github.com/oqyh";

Expand Down

0 comments on commit 60a494d

Please sign in to comment.