But it it crashs on mapchange. I localized the problem: Obviously "ChooseZombie" is the reason.
This version does only CheckWin but server is at least stable on mapchange:
PHP Code:
public OnClientDisconnect_Post(client) {
g_nomessage[client] = 0;
if (g_bRunning) {
if (GetTeamClientCount(g_iZombieTeam) == 0) {
// ChooseZombie(); // makes crash on mapchange - dont know why
// ChangeClientTeam(g_iZombie, g_iZombieTeam); // so disabled
// PrintHintText(g_iZombie, "You are now the Zombie"); // so disabled
} else {
CheckWin();
}
}
}
or just simply:
PHP Code:
public OnClientDisconnect_Post(client) {
g_nomessage[client] = 0;
if (g_bRunning) {
if (GetTeamClientCount(g_iZombieTeam) != 0) {
CheckWin();
}
}
}