Add a centerprint message when joining a team that is full

This commit is contained in:
smallmodel 2025-01-05 20:19:52 +01:00
parent 418985f90b
commit 8fb3856ea6
No known key found for this signature in database
GPG key ID: A96F163ED4891440

View file

@ -11565,13 +11565,15 @@ qboolean Player::CheckCanSwitchTeam(teamtype_t team)
}
if (pNewTeam->m_players.NumObjects() > numTeamPlayers) {
const char* message = gi.LV_ConvertString("That team has enough players. Choose the team that has the lowest number of players.");
gi.SendServerCommand(
edict - g_entities,
"print \"" HUD_MESSAGE_WHITE "%s\n\"",
gi.LV_ConvertString(
"That team has enough players. Choose the team that has the lowest number of players."
)
gi.LV_ConvertString(message)
);
gi.centerprintf(edict, message);
return qfalse;
}
}