diff --git a/FakeClients/scripting/FakeClients.sp b/FakeClients/scripting/FakeClients.sp index 3dbf1de..f2b1687 100755 --- a/FakeClients/scripting/FakeClients.sp +++ b/FakeClients/scripting/FakeClients.sp @@ -515,34 +515,36 @@ public void CheckPopulation() } else if (iPlayers < 6) { - max = iPlayers * 5; + max = iPlayers * 3; min = iPlayers * 2; } else if (iPlayers < 11) { - max = RoundToFloor(iPlayers * 1.5); + max = iPlayers; min = iPlayers; } else if (iPlayers < 20) { - max = iPlayers; + max = RoundToFloor(iPlayers * 0.5); min = RoundToFloor(iPlayers * 0.5); } else if (iPlayers < 26) { - max = iPlayers; + max = RoundToFloor(iPlayers * 0.5); min = RoundToFloor(iPlayers * 0.3); } else if (iPlayers < 36) { - max = RoundToFloor(iPlayers * 0.5); - min = RoundToFloor(iPlayers * 0.3); + max = RoundToFloor(iPlayers * 0.3); + min = RoundToFloor(iPlayers * 0.1); } else { max = RoundToFloor(iPlayers * 0.3); min = RoundToFloor(iPlayers * 0.1); } + max += 3; + min += 2; iFakesNeeded = GetRandomInt(min, max); //iFakesNeeded = randomAmount - iPlayers; @@ -553,7 +555,7 @@ public void CheckPopulation() } else { - iFakesInTeamNeeded = iFakesNeeded / 3; + iFakesInTeamNeeded = (iFakesNeeded / 4); } if (iFakesInTeamNeeded < 0) { @@ -640,34 +642,34 @@ public void CheckPopulation() iFakesInTeam++; } - if (iFakes == iFakesNeeded && iFakesInTeam != iFakesInTeamNeeded && g_iAdminFakes == -1) + if (iFakesInTeam != iFakesInTeamNeeded && g_iAdminFakes == -1) { - while (iFakesInTeam < iFakesInTeamNeeded) - { - for(int i = 1; i <= MaxClients; i++) - { - if(g_bFakePopulation[i] && GetClientTeam(i) <= CS_TEAM_SPECTATOR) - { - ChangeClientTeam(i, CS_TEAM_CT); - FakeClientCommandEx(i, "joinclass"); - iFakesInTeam++; - break; - } - } - } + if (iFakesInTeam < iFakesInTeamNeeded) + { + for(int i = 1; i <= MaxClients; i++) + { + if(g_bFakePopulation[i] && GetClientTeam(i) <= CS_TEAM_SPECTATOR) + { + ChangeClientTeam(i, CS_TEAM_CT); + FakeClientCommandEx(i, "joinclass"); + iFakesInTeam++; + break; + } + } + } - while (iFakesInTeam > iFakesInTeamNeeded) - { - for(int i = 1; i <= MaxClients; i++) - { - if(g_bFakePopulation[i] && GetClientTeam(i) >= CS_TEAM_T) - { - ChangeClientTeam(i, CS_TEAM_SPECTATOR); - iFakesInTeam--; - break; - } - } - } + if (iFakesInTeam > iFakesInTeamNeeded) + { + for(int i = 1; i <= MaxClients; i++) + { + if(g_bFakePopulation[i] && GetClientTeam(i) >= CS_TEAM_T) + { + ChangeClientTeam(i, CS_TEAM_SPECTATOR); + iFakesInTeam--; + break; + } + } + } } }