1
0
Fork 0
mirror of https://codeberg.org/spire/autoexec.git synced 2026-06-03 18:24:06 +02:00

fix mode check in warning

This commit is contained in:
Robin Appelman 2020-05-10 20:54:04 +02:00
commit b523fb4271

View file

@ -241,11 +241,11 @@ public void CheckPlayerCount(int team) {
GetConVarString(CvarMode, gamemode, sizeof(gamemode)); GetConVarString(CvarMode, gamemode, sizeof(gamemode));
if (!warned[team]) { if (!warned[team]) {
if (strcmp(gamemode, "9v9") && playerCount != 9) { if (strcmp(gamemode, "9v9") == 0 && playerCount != 9) {
warned[team] = true; warned[team] = true;
PrintToChatAll("Warning, config is set to 9v9 but you readied up with %d players", playerCount); PrintToChatAll("Warning, config is set to 9v9 but you readied up with %d players", playerCount);
GameRules_SetProp("m_bTeamReady", 0, _ , team, true); GameRules_SetProp("m_bTeamReady", 0, _ , team, true);
} else if (strcmp(gamemode, "6v6") && playerCount != 6) { } else if (strcmp(gamemode, "6v6") == 0 && playerCount != 6) {
warned[team] = true; warned[team] = true;
GameRules_SetProp("m_bTeamReady", 0, _ , team, true); GameRules_SetProp("m_bTeamReady", 0, _ , team, true);
PrintToChatAll("Warning, config is set to 6v6 but you readied up with %d players", playerCount); PrintToChatAll("Warning, config is set to 6v6 but you readied up with %d players", playerCount);