raven Opublikowano 25 Czerwca 2019 Udostępnij Opublikowano 25 Czerwca 2019 Często po wymieszaniu drużyn na serwerze dzieje się tak, że przez 1-2 rundy gra się 6 v 4, nie wiem czy jesteście to w stanie naprawić, ale dobrze by było. @ xBonio Odnośnik do komentarza Udostępnij na innych stronach Więcej opcji udostępniania...
Mikru Opublikowano 25 Czerwca 2019 Udostępnij Opublikowano 25 Czerwca 2019 Powierdzam :v Odnośnik do komentarza Udostępnij na innych stronach Więcej opcji udostępniania...
xBonio Opublikowano 25 Czerwca 2019 Udostępnij Opublikowano 25 Czerwca 2019 ok, znajdź mi gdzie tu jest błąd jak taki kozak BalanceTeams() { //Balance Team if not Balanced new terrorCount = RoundToFloor(GetClientCountFix(false) / 2.0); if(terrorCount > 5) terrorCount = 5; if(terrorCount < GetNextTeamCount(2, true)) { new DamageList[MaxClients]; new IndexList[MaxClients]; new count = 0; for (new i = 1; i <= MaxClients; i++) { if(IsClientInGame(i) && GetClientTeam(i) == 2) { DamageList[count] = GetClientFrags(i); IndexList[count] = i; count++; } } new temp; new temp2; for (new i = 0; i < count; i++) { for (new j = i+1; j < count; j++) { if(DamageList[i] < DamageList[j]) { temp = DamageList[i]; temp2 = IndexList[i]; DamageList[i] = DamageList[j]; IndexList[i] = IndexList[j]; DamageList[j] = temp; IndexList[j] = temp2; } } } for (new i = 0; i < GetNextTeamCount(2, true) - terrorCount; i++) { gi_NextRoundTeam[IndexList[i]] = 3; } } else if(terrorCount > GetNextTeamCount(2, true)) { new DamageList[MaxClients]; new IndexList[MaxClients]; new count = 0; for (new i = 1; i <= MaxClients; i++) { if(IsClientInGame(i) && GetClientTeam(i) == 3) { DamageList[count] = GetClientFrags(i); IndexList[count] = i; count++; } } new temp; new temp2; for (new i = 0; i < count; i++) { for (new j = i+1; j < count; j++) { if(DamageList[i] > DamageList[j]) { temp = DamageList[i]; temp2 = IndexList[i]; DamageList[i] = DamageList[j]; IndexList[i] = IndexList[j]; DamageList[j] = temp; IndexList[j] = temp2; } } } for (new i = 0; i < terrorCount - GetNextTeamCount(2, true); i++) { gi_NextRoundTeam[IndexList[i]] = 2; } } } ScrambleTeams(bool:includespec) { PrintToChatAll("%sMieszanie drużyn.", PREFIX); new terrorCount = RoundToFloor(GetClientCountFix(includespec) / 2.0); if(terrorCount > 5) terrorCount = 5; new randomPlayer = -1; for (new i = 0; i < MAXPLAYERS; i++) { gi_NextRoundTeam[i] = -1; } for (new i = 0; i < terrorCount; i++) { randomPlayer = GetRandomPlayer(includespec); if(randomPlayer != -1) { gi_NextRoundTeam[randomPlayer] = 2; if(GetClientTeam(randomPlayer) == 1) { DeletePlayerFromQueue(i); } } } new ctCount = GetClientCountFix(true) - terrorCount; if(ctCount > 5) ctCount = 5; for (int i = 0; i < ctCount; i++) { randomPlayer = GetRandomPlayer(includespec); if(randomPlayer != -1) { gi_NextRoundTeam[randomPlayer] = 3; if(GetClientTeam(randomPlayer) == 1) { DeletePlayerFromQueue(i); } } } for (int i = 1; i <= MaxClients; i++) { if(IsClientInGame(i) && gi_NextRoundTeam[i] == -1) { gi_NextRoundTeam[i] = 1; AddPlayerToQueue(i); } } gb_balancedTeams = true; } 1 1 Odnośnik do komentarza Udostępnij na innych stronach Więcej opcji udostępniania...
raven Opublikowano 25 Czerwca 2019 Autor Udostępnij Opublikowano 25 Czerwca 2019 Czyli zostaje jak jest. Sprawa została wyjaśniona. Odnośnik do komentarza Udostępnij na innych stronach Więcej opcji udostępniania...
Rekomendowane odpowiedzi