Revival of the few zombie during the reboot.
Hey all.
I don't know how to make to the restart there was more than one zombie, I would like to do to the amount of zombies grow depending on the number of hunters, as well as the NoDL.
The second problem is that when join the second player when you type in console,, kill'' is the restart round. I tried to do so by attaching the second player to the game, there was a restart. But to no avail... :confused:
Please help me.
PHP Code:
checkRestart(zombie)
{
numonteam["allies"] = 0;
numonteam["axis"] = 0;
players = getentarray("player", "classname");
for(i = 0; i < players.size; i++)
{
player = players[i];
if(!isDefined(player.pers["team"]) || player.pers["team"] == "spectator" || (isPlayer(self) && self.sessionstate == "playing"))
continue;
numonteam[player.pers["team"]]++;
}
if(numonteam["allies"] == 0 && (numonteam["axis"] != 0 && numonteam["axis"] != 1)) // Restart the round if the server has more than one zombies
{
if(isDefined(zombie) && isPlayer(zombie))
{
axisPlayer = zombie;
}
else
{
axisPlayer = players[randomint(players.size)];
}
for(i = 0; i < players.size; i++)
{
player = players[i];
if(!isDefined(player.pers["team"]) || player.pers["team"] == "spectator")
continue;
player thread showText(&"ZOM_ROUND_RESTART");
if (player == axisPlayer)
{
player thread movePlayer("axis", 2);
}
else
{
player thread movePlayer("allies", 4);
}
}
return true;
}
else
{
return false;
}
}