Hey guys,
Sorry for what i will say but i dont know how to exmple that, i hope someone know what i mean!!!
I need help, I added code from zombie plague mod to basebuilder for check round task check that we still have both zombies and humans on a round and it's working without anyproblems but my problem is i have to disable roundend for round didn't end if user did disconnect and i did it but not worked
My question is : how to disable roundend from those code ?
2: I dont want round end when those code working, because Basebuilder mod working like: if last zombie/human disconnecting from the server round will stay work but if there who connecting to the server at the same round will join to Empty team but i dont want that, so can someone tell me where i can edit that from bb mod /?
PHP Code:
// Check Round Task -check that we still have both zombies and humans on a round-
check_round(leaving_player)
{
// Round ended or make_a_zombie task still active
if (g_boolRoundEnded)
return;
// Get alive players count
static iPlayersnum, id
iPlayersnum = fnGetAlive()
// Last alive player, don't bother
if (iPlayersnum < 2)
return;
// Last zombie disconnecting
if (g_isZombie[leaving_player] && fnGetZombies() == 1)
{
// Only one CT left, don't bother
if (fnGetHumans() == 1 && fnGetCTs() == 1)
return;
// Pick a random one to take his place
while ((id = fnGetRandomAlive(random_num(1, iPlayersnum))) == leaving_player ) { /* keep looping */ }
// Show last zombie left notice
print_color(0, "%s The last zombie has left,^x03 %s^x01 is the new zombie!", MODNAME, g_playername[id])
// Turn into a Nemesis, Assassin or just a zombie?
cs_set_user_team(leaving_player, CS_TEAM_T)
ExecuteHamB(Ham_CS_RoundRespawn, id)
}
// Last human disconnecting
else if (!g_isZombie[leaving_player] && fnGetHumans() == 1)
{
// Only one T left, don't bother
if (fnGetZombies() == 1 && fnGetTs() == 1)
return;
// Pick a random one to take his place
while ((id = fnGetRandomAlive(random_num(1, iPlayersnum))) == leaving_player ) { /* keep looping */ }
// Show last human left notice
print_color(0, "%s The last zombie has left,^x03 %s^x01 is the new zombie!", MODNAME, g_playername[id])
// Turn into a Survivor, Sniper or just a human?
cs_set_user_team(leaving_player, CS_TEAM_CT)
ExecuteHamB(Ham_CS_RoundRespawn, id)
}
}