forked from UNLOZE/sm-plugins
just moving stuff in fakeclients over to functions. in the low pop helper plugin using a new native from mapchooser. skipping boost if first round and also including spectators now
This commit is contained in:
@@ -42,7 +42,7 @@ public void OnMapStart()
|
||||
{
|
||||
//Decided for now to exclude MaxPlayers
|
||||
//MaxTime, MinTime, MinPlayers, CooldownTime, MinHoursAvg
|
||||
if (GetMapMaxTime(map) != 0 || GetMapMinTime(map) != 0 || GetMapMinPlayers(map) != 0 /*|| GetMapMaxPlayers(map) != 0*/ || GetMapCooldownTime(map) > 60
|
||||
if (GetMapMaxTime(map) != 0 || GetMapMinTime(map) != 0 || GetMapMinPlayers(map) != 0 /*|| GetMapMaxPlayers(map) != 0*/ || GetMapCooldownTime2(map) > 60
|
||||
|| GetMapMinHoursAvg(map) != 0)
|
||||
{
|
||||
g_bDoingMapTouristMode = true;
|
||||
@@ -52,17 +52,23 @@ public void OnMapStart()
|
||||
|
||||
public void OnRoundStart(Event hEvent, const char[] sEvent, bool bDontBroadcast)
|
||||
{
|
||||
if (CS_GetTeamScore(CS_TEAM_T) == 0 && CS_GetTeamScore(CS_TEAM_CT) == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
int active_player_count = 0;
|
||||
|
||||
for (int i = 1; i <= MaxClients; i++)
|
||||
{
|
||||
if(IsClientConnected(i) && IsClientInGame(i) && IsClientAuthorized(i) && !IsFakeClient(i) && !IsClientAutismBot(i) && !IsClientSourceTV(i) && GetClientTeam(i) > CS_TEAM_SPECTATOR)
|
||||
if(IsClientConnected(i) && IsClientInGame(i) && IsClientAuthorized(i) && !IsFakeClient(i) && !IsClientAutismBot(i) && !IsClientSourceTV(i))
|
||||
{
|
||||
active_player_count++;
|
||||
}
|
||||
}
|
||||
|
||||
if (active_player_count < 24)
|
||||
int choosen_number = 24;
|
||||
if (active_player_count < choosen_number)
|
||||
{
|
||||
int zombie_ratio = GetConVarInt(FindConVar("zr_infect_mzombie_ratio"));
|
||||
|
||||
@@ -73,7 +79,7 @@ public void OnRoundStart(Event hEvent, const char[] sEvent, bool bDontBroadcast)
|
||||
else if(knockback_increase < 1.0)
|
||||
knockback_increase = 1.0
|
||||
|
||||
if (knockback_increase > 1.0 || (g_bDoingMapTouristMode && active_player_count < 18))
|
||||
if (knockback_increase > 1.0 || (g_bDoingMapTouristMode && active_player_count < choosen_number))
|
||||
{
|
||||
if (g_bDoingMapTouristMode)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user