Quote:
Originally Posted by Shadows Adi
reGameDll have a built in function, search in game.cfg for mp_round_infinite.
Code:
// Disable round end by game scenario
// 0 - disabled (default behaviour)
// 1 - enabled (never end round)
//
// Flags for fine grained control (choose as many as needed)
// a - block round time round end check
// b - block needed players round end check
// c - block VIP assassination/success round end check
// d - block prison escape round end check
// e - block bomb round end check
// f - block team extermination round end check
// g - block hostage rescue round end check
//
// Example setting: "ae" - blocks round time and bomb round end checks
// Default value: "0"
mp_round_infinite 0
|
if i used it like server_cmd ("mp_round_infinite 0") on those codes, it will be work ? or not ?
Like this
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;
server_cmd ("mp_round_infinite 0")
// 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)
}
}
Edit: i tested it but not worked