Code:
make_a_zombie(mode, id)
{
// Get alive players count
static iPlayersnum
iPlayersnum = fnGetAlive()
// Not enough players, come back later!
if (iPlayersnum < 1)
{
set_task(2.0, "make_zombie_task", TASK_MAKEZOMBIE)
return;
}
// Round started!
g_newround = false
// Set up some common vars
static forward_id, sound[64], iZombies, iMaxZombies
if ((mode == MODE_NONE && (!get_pcvar_num(cvar_preventconsecutive) || g_lastmode != MODE_SURVIVOR) && random_num(1, get_pcvar_num(cvar_survchance)) == get_pcvar_num(cvar_surv) && iPlayersnum >= get_pcvar_num(cvar_survminplayers)) || mode == MODE_SURVIVOR)
{
// Survivor Mode
g_survround = true
g_lastmode = MODE_SURVIVOR
// Choose player randomly?
if (mode == MODE_NONE)
id = fnGetRandomAlive(random_num(1, iPlayersnum))
// Remember id for calling our forward later
forward_id = id
// Turn player into a survivor
humanme(id, 1, 0, 0)
// Turn the remaining players into zombies
for (id = 1; id <= g_maxplayers; id++)
{
// Not alive
if (!g_isalive[id])
continue;
// Survivor or already a zombie
if (g_survivor[id] || g_zombie[id])
continue;
// Turn into a zombie
zombieme(id, 0, 0, 0, 1, 0)
}
// Play survivor sound
ArrayGetString(sound_survivor, random_num(0, ArraySize(sound_survivor) - 1), sound, charsmax(sound))
PlaySound(sound);
// Show Survivor HUD notice
set_hudmessage(20, 20, 255, HUD_EVENT_X, HUD_EVENT_Y, 1, 0.0, 5.0, 1.0, 1.0, -1)
ShowSyncHudMsg(0, g_MsgSync, "%L", LANG_PLAYER, "NOTICE_SURVIVOR", g_playername[forward_id])
// Mode fully started!
g_modestarted = true
// Round start forward
ExecuteForward(g_fwRoundStart, g_fwDummyResult, MODE_SURVIVOR, forward_id);
}
else if ((mode == MODE_NONE && (!get_pcvar_num(cvar_preventconsecutive) || g_lastmode != MODE_SNIPER) && random_num(1, get_pcvar_num(cvar_snipchance)) == get_pcvar_num(cvar_snip) && iPlayersnum >= get_pcvar_num(cvar_snipminplayers)) || mode == MODE_SNIPER)
{
// Sniper Mode
g_snipround = true
g_lastmode = MODE_SNIPER
// Choose player randomly?
if (mode == MODE_NONE)
id = fnGetRandomAlive(random_num(1, iPlayersnum))
// Remember id for calling our forward later
forward_id = id
// Turn player into a sniper
humanme(id, 0, 1, 0)
// Turn the remaining players into zombies
for (id = 1; id <= g_maxplayers; id++)
{
// Not alive
if (!g_isalive[id])
continue;
// Sniper or already a zombie
if (g_sniper[id] || g_zombie[id])
continue;
// Turn into a zombie
zombieme(id, 0, 0, 0, 1, 0)
}
// Play sniper sound
ArrayGetString(sound_sniper, random_num(0, ArraySize(sound_sniper) - 1), sound, charsmax(sound))
PlaySound(sound);
// Show Sniper HUD notice
set_hudmessage(20, 20, 255, HUD_EVENT_X, HUD_EVENT_Y, 1, 0.0, 5.0, 1.0, 1.0, -1)
ShowSyncHudMsg(0, g_MsgSync, "%L", LANG_PLAYER, "NOTICE_SNIPER", g_playername[forward_id])
// Mode fully started!
g_modestarted = true
// Round start forward
ExecuteForward(g_fwRoundStart, g_fwDummyResult, MODE_SNIPER, forward_id);
}
else if ((mode == MODE_NONE && (!get_pcvar_num(cvar_preventconsecutive) || g_lastmode != MODE_SWARM) && random_num(1, get_pcvar_num(cvar_swarmchance)) == get_pcvar_num(cvar_swarm) && iPlayersnum >= get_pcvar_num(cvar_swarmminplayers)) || mode == MODE_SWARM)
{
// Swarm Mode
g_swarmround = true
g_lastmode = MODE_SWARM
// Make sure there are alive players on both teams (BUGFIX)
if (!fnGetAliveTs())
{
// Move random player to T team
id = fnGetRandomAlive(random_num(1, iPlayersnum))
remove_task(id+TASK_TEAM)
fm_cs_set_user_team(id, FM_CS_TEAM_T)
fm_user_team_update(id)
}
else if (!fnGetAliveCTs())
{
// Move random player to CT team
id = fnGetRandomAlive(random_num(1, iPlayersnum))
remove_task(id+TASK_TEAM)
fm_cs_set_user_team(id, FM_CS_TEAM_CT)
fm_user_team_update(id)
}
// Turn every T into a zombie
for (id = 1; id <= g_maxplayers; id++)
{
// Not alive
if (!g_isalive[id])
continue;
// Not a Terrorist
if (fm_cs_get_user_team(id) != FM_CS_TEAM_T)
continue;
// Turn into a zombie
zombieme(id, 0, 0, 0, 1, 0)
}
// Play swarm sound
ArrayGetString(sound_swarm, random_num(0, ArraySize(sound_swarm) - 1), sound, charsmax(sound))
PlaySound(sound);
// Show Swarm HUD notice
set_hudmessage(20, 255, 20, HUD_EVENT_X, HUD_EVENT_Y, 1, 0.0, 5.0, 1.0, 1.0, -1)
ShowSyncHudMsg(0, g_MsgSync, "%L", LANG_PLAYER, "NOTICE_SWARM")
// Mode fully started!
g_modestarted = true
// Round start forward
ExecuteForward(g_fwRoundStart, g_fwDummyResult, MODE_SWARM, 0);
}
else if ((mode == MODE_NONE && (!get_pcvar_num(cvar_preventconsecutive) || g_lastmode != MODE_MULTI) && random_num(1, get_pcvar_num(cvar_multichance)) == get_pcvar_num(cvar_multi) && floatround(iPlayersnum*get_pcvar_float(cvar_multiratio), floatround_ceil) >= 2 && floatround(iPlayersnum*get_pcvar_float(cvar_multiratio), floatround_ceil) < iPlayersnum && iPlayersnum >= get_pcvar_num(cvar_multiminplayers)) || mode == MODE_MULTI)
{
// Multi Infection Mode
g_lastmode = MODE_MULTI
// iMaxZombies is rounded up, in case there aren't enough players
iMaxZombies = floatround(iPlayersnum*get_pcvar_float(cvar_multiratio), floatround_ceil)
iZombies = 0
// Randomly turn iMaxZombies players into zombies
while (iZombies < iMaxZombies)
{
// Keep looping through all players
if (++id > g_maxplayers) id = 1
// Dead or already a zombie
if (!g_isalive[id] || g_zombie[id])
continue;
// Random chance
if (random_num(0, 1))
{
// Turn into a zombie
zombieme(id, 0, 0, 0, 1, 0)
iZombies++
}
}
// Turn the remaining players into humans
for (id = 1; id <= g_maxplayers; id++)
{
// Only those of them who aren't zombies
if (!g_isalive[id] || g_zombie[id])
continue;
// Switch to CT
if (fm_cs_get_user_team(id) != FM_CS_TEAM_CT) // need to change team?
{
remove_task(id+TASK_TEAM)
fm_cs_set_user_team(id, FM_CS_TEAM_CT)
fm_user_team_update(id)
}
}
// Play multi infection sound
ArrayGetString(sound_multi, random_num(0, ArraySize(sound_multi) - 1), sound, charsmax(sound))
PlaySound(sound);
// Show Multi Infection HUD notice
set_hudmessage(200, 50, 0, HUD_EVENT_X, HUD_EVENT_Y, 1, 0.0, 5.0, 1.0, 1.0, -1)
ShowSyncHudMsg(0, g_MsgSync, "%L", LANG_PLAYER, "NOTICE_MULTI")
// Mode fully started!
g_modestarted = true
// Round start forward
ExecuteForward(g_fwRoundStart, g_fwDummyResult, MODE_MULTI, 0);
}
else if ((mode == MODE_NONE && (!get_pcvar_num(cvar_preventconsecutive) || g_lastmode != MODE_PLAGUE) && random_num(1, get_pcvar_num(cvar_plaguechance)) == get_pcvar_num(cvar_plague) && floatround((iPlayersnum-(get_pcvar_num(cvar_plaguenemnum)+get_pcvar_num(cvar_plaguesurvnum)))*get_pcvar_float(cvar_plagueratio), floatround_ceil) >= 1
&& iPlayersnum-(get_pcvar_num(cvar_plaguesurvnum)+get_pcvar_num(cvar_plaguenemnum)+floatround((iPlayersnum-(get_pcvar_num(cvar_plaguenemnum)+get_pcvar_num(cvar_plaguesurvnum)))*get_pcvar_float(cvar_plagueratio), floatround_ceil)) >= 1 && iPlayersnum >= get_pcvar_num(cvar_plagueminplayers)) || mode == MODE_PLAGUE)
{
// Plague Mode
g_plagueround = true
g_lastmode = MODE_PLAGUE
// Turn specified amount of players into Survivors
static iSurvivors, iMaxSurvivors
iMaxSurvivors = get_pcvar_num(cvar_plaguesurvnum)
iSurvivors = 0
while (iSurvivors < iMaxSurvivors)
{
// Choose random guy
id = fnGetRandomAlive(random_num(1, iPlayersnum))
// Already a survivor?
if (g_survivor[id])
continue;
// If not, turn him into one
humanme(id, 1, 0, 0)
iSurvivors++
// Apply survivor health multiplier
fm_set_user_health(id, floatround(float(pev(id, pev_health)) * get_pcvar_float(cvar_plaguesurvhpmulti)))
}
// Turn specified amount of players into Nemesis
static iNemesis, iMaxNemesis
iMaxNemesis = get_pcvar_num(cvar_plaguenemnum)
iNemesis = 0
while (iNemesis < iMaxNemesis)
{
// Choose random guy
id = fnGetRandomAlive(random_num(1, iPlayersnum))
// Already a survivor or nemesis?
if (g_survivor[id] || g_nemesis[id])
continue;
// If not, turn him into one
zombieme(id, 0, 1, 0, 0, 0)
iNemesis++
// Apply nemesis health multiplier
fm_set_user_health(id, floatround(float(pev(id, pev_health)) * get_pcvar_float(cvar_plaguenemhpmulti)))
}
// iMaxZombies is rounded up, in case there aren't enough players
iMaxZombies = floatround((iPlayersnum-(get_pcvar_num(cvar_plaguenemnum)+get_pcvar_num(cvar_plaguesurvnum)))*get_pcvar_float(cvar_plagueratio), floatround_ceil)
iZombies = 0
// Randomly turn iMaxZombies players into zombies
while (iZombies < iMaxZombies)
{
// Keep looping through all players
if (++id > g_maxplayers) id = 1
// Dead or already a zombie or survivor
if (!g_isalive[id] || g_zombie[id] || g_survivor[id])
continue;
// Random chance
if (random_num(0, 1))
{
// Turn into a zombie
zombieme(id, 0, 0, 0, 1, 0)
iZombies++
}
}
// Turn the remaining players into humans
for (id = 1; id <= g_maxplayers; id++)
{
// Only those of them who arent zombies or survivor
if (!g_isalive[id] || g_zombie[id] || g_survivor[id])
continue;
// Switch to CT
if (fm_cs_get_user_team(id) != FM_CS_TEAM_CT) // need to change team?
{
remove_task(id+TASK_TEAM)
fm_cs_set_user_team(id, FM_CS_TEAM_CT)
fm_user_team_update(id)
}
}
// Play plague sound
ArrayGetString(sound_plague, random_num(0, ArraySize(sound_plague) - 1), sound, charsmax(sound))
PlaySound(sound);
// Show Plague HUD notice
set_hudmessage(0, 50, 200, HUD_EVENT_X, HUD_EVENT_Y, 1, 0.0, 5.0, 1.0, 1.0, -1)
ShowSyncHudMsg(0, g_MsgSync, "%L", LANG_PLAYER, "NOTICE_PLAGUE")
// Mode fully started!
g_modestarted = true
// Round start forward
ExecuteForward(g_fwRoundStart, g_fwDummyResult, MODE_PLAGUE, 0);
}
else if ((mode == MODE_NONE && (!get_pcvar_num(cvar_preventconsecutive) || g_lastmode != MODE_ARMAGEDDON) && random_num(1, get_pcvar_num(cvar_armagechance)) == get_pcvar_num(cvar_armage) && iPlayersnum >= get_pcvar_num(cvar_armageminplayers) && iPlayersnum >= 2) || mode == MODE_ARMAGEDDON)
{
// Armageddon Mode
g_armageround = true
g_lastmode = MODE_ARMAGEDDON
// iMaxZombies is rounded up, in case there aren't enough players
iMaxZombies = floatround((iPlayersnum * get_pcvar_float(cvar_armageratio)), floatround_ceil)
iZombies = 0
// Randomly turn iMaxZombies players into Nemesis
while (iZombies < iMaxZombies)
{
// Keep looping through all players
if (++id > g_maxplayers) id = 1
// Dead or already a zombie or survivor
if (!g_isalive[id] || g_zombie[id] || g_survivor[id])
continue;
// Random chance
if (random_num(0, 1))
{
// Turn into a Nemesis
zombieme(id, 0, 1, 0, 0, 0)
fm_set_user_health(id, floatround(float(pev(id, pev_health)) * get_pcvar_float(cvar_armagenemhpmulti)))
iZombies++
}
}
// Turn the remaining players into survivors
for (id = 1; id <= g_maxplayers; id++)
{
// Only those of them who arent zombies or survivor
if (!g_isalive[id] || g_zombie[id]|| g_survivor[id])
continue;
// Turn into a Survivor
humanme(id, 1, 0, 0)
fm_set_user_health(id, floatround(float(pev(id, pev_health)) * get_pcvar_float(cvar_armagesurvhpmulti)))
}
// Play armageddon sound
ArrayGetString(sound_armageddon, random_num(0, ArraySize(sound_armageddon) - 1), sound, charsmax(sound))
PlaySound(sound);
// Show Armageddon HUD notice
set_hudmessage(181, 62, 244, HUD_EVENT_X, HUD_EVENT_Y, 1, 0.0, 5.0, 1.0, 1.0, -1)
ShowSyncHudMsg(0, g_MsgSync, "%L", LANG_PLAYER, "NOTICE_ARMAGEDDON")
// Mode fully started!
g_modestarted = true
// Round start forward
ExecuteForward(g_fwRoundStart, g_fwDummyResult, MODE_ARMAGEDDON, 0);
}
else if ((mode == MODE_NONE && (!get_pcvar_num(cvar_preventconsecutive) || g_lastmode != MODE_APOCALYPSE) && random_num(1, get_pcvar_num(cvar_apocchance)) == get_pcvar_num(cvar_apoc) && iPlayersnum >= get_pcvar_num(cvar_apocminplayers) && iPlayersnum >= 2) || mode == MODE_APOCALYPSE)
{
// Apocalypse Mode
g_apocround = true
g_lastmode = MODE_APOCALYPSE
// iMaxZombies is rounded up, in case there aren't enough players
iMaxZombies = floatround((iPlayersnum * get_pcvar_float(cvar_apocratio)), floatround_ceil)
iZombies = 0
// Randomly turn iMaxZombies players into Assassin
while (iZombies < iMaxZombies)
{
// Keep looping through all players
if (++id > g_maxplayers) id = 1
// Dead or already a zombie or sniper
if (!g_isalive[id] || g_zombie[id] || g_sniper[id])
continue;
// Random chance
if (random_num(0, 1))
{
// Turn into a Assassin
zombieme(id, 0, 0, 1, 0, 0)
fm_set_user_health(id, floatround(float(pev(id, pev_health)) * get_pcvar_float(cvar_apocassahpmulti)))
iZombies++
}
}
// Turn the remaining players into snipers
for (id = 1; id <= g_maxplayers; id++)
{
// Only those of them who arent zombies or sniper
if (!g_isalive[id] || g_zombie[id]|| g_sniper[id])
continue;
// Turn into a Sniper
humanme(id, 0, 1, 0)
fm_set_user_health(id, floatround(float(pev(id, pev_health)) * get_pcvar_float(cvar_apocsniphpmulti)))
}
// Play apocalypse sound
ArrayGetString(sound_apocalypse, random_num(0, ArraySize(sound_apocalypse) - 1), sound, charsmax(sound))
PlaySound(sound);
// Show Apocalypse HUD notice
set_hudmessage(181, 62, 244, HUD_EVENT_X, HUD_EVENT_Y, 1, 0.0, 5.0, 1.0, 1.0, -1)
ShowSyncHudMsg(0, g_MsgSync, "%L", LANG_PLAYER, "NOTICE_APOCALYPSE")
// Mode fully started!
g_modestarted = true
// Round start forward
ExecuteForward(g_fwRoundStart, g_fwDummyResult, MODE_APOCALYPSE, 0);
}
else if ((mode == MODE_NONE && (!get_pcvar_num(cvar_preventconsecutive) || g_lastmode != MODE_NIGHTMARE) && random_num(1, get_pcvar_num(cvar_nightchance)) == get_pcvar_num(cvar_night) && iPlayersnum >= get_pcvar_num(cvar_nightminplayers) && iPlayersnum >= 4) || mode == MODE_NIGHTMARE)
{
// Nightmare mode
g_nightround = true
g_lastmode = MODE_NIGHTMARE
iMaxZombies = floatround((iPlayersnum * 0.25), floatround_ceil)
iZombies = 0
while (iZombies < iMaxZombies)
{
if ((++id) > g_maxplayers) id = 1
if (!g_isalive[id])
continue;
if (random_num(1, 5) == 1)
{
zombieme(id, 0, 0, 1, 0, 0)
fm_set_user_health(id, floatround(float(pev(id, pev_health)) * get_pcvar_float(cvar_nightassahpmulti)))
iZombies++
}
}
iZombies = 0
while (iZombies < iMaxZombies)
{
if ((++id) > g_maxplayers) id = 1
if (!g_isalive[id] || g_assassin[id])
continue;
if (random_num(1, 5) == 1)
{
zombieme(id, 0, 1, 0, 0, 0)
fm_set_user_health(id, floatround(float(pev(id, pev_health)) * get_pcvar_float(cvar_nightnemhpmulti)))
iZombies++
}
}
iZombies = 0
while (iZombies < iMaxZombies)
{
if ((++id) > g_maxplayers) id = 1
if (!g_isalive[id] || g_assassin[id] || g_nemesis[id])
continue;
if (random_num(1, 5) == 1)
{
humanme(id, 1, 0, 0)
fm_set_user_health(id, floatround(float(pev(id, pev_health)) * get_pcvar_float(cvar_nightsurvhpmulti)))
iZombies++
}
}
for (id = 1; id <= g_maxplayers; id++)
{
if (!g_isalive[id] || g_assassin[id] || g_nemesis[id] || g_survivor[id])
continue;
humanme(id, 0, 1, 0)
fm_set_user_health(id, floatround(float(pev(id, pev_health)) * get_pcvar_float(cvar_nightsniphpmulti)))
}
// Play nightmare sound
ArrayGetString(sound_nightmare, random_num(0, ArraySize(sound_nightmare) - 1), sound, charsmax(sound))
PlaySound(sound);
// Show Nightmare HUD notice
set_hudmessage(181, 62, 244, HUD_EVENT_X, HUD_EVENT_Y, 1, 0.0, 5.0, 1.0, 1.0, -1)
ShowSyncHudMsg(0, g_MsgSync, "%L", LANG_PLAYER, "NOTICE_NIGHTMARE")
// Mode fully started!
g_modestarted = true
// Round start forward
ExecuteForward(g_fwRoundStart, g_fwDummyResult, MODE_NIGHTMARE, 0);
}
else
{
// Single Infection Mode or Nemesis Mode
// Choose player randomly?
if (mode == MODE_NONE)
id = fnGetRandomAlive(random_num(1, iPlayersnum))
// Remember id for calling our forward later
forward_id = id
if ((mode == MODE_NONE && (!get_pcvar_num(cvar_preventconsecutive) || g_lastmode != MODE_NEMESIS) && random_num(1, get_pcvar_num(cvar_nemchance)) == get_pcvar_num(cvar_nem) && iPlayersnum >= get_pcvar_num(cvar_nemminplayers)) || mode == MODE_NEMESIS)
{
// Nemesis Mode
g_nemround = true
g_lastmode = MODE_NEMESIS
// Turn player into nemesis
zombieme(id, 0, 1, 0, 0, 0)
}
else if ((mode == MODE_NONE && (!get_pcvar_num(cvar_preventconsecutive) || g_lastmode != MODE_ASSASSIN) && random_num(1, get_pcvar_num(cvar_assachance)) == get_pcvar_num(cvar_assa) && iPlayersnum >= get_pcvar_num(cvar_assaminplayers)) || mode == MODE_ASSASSIN)
{
// Assassin Mode
g_assaround = true
g_lastmode = MODE_ASSASSIN
// Turn player into assassin
zombieme(id, 0, 0, 1, 0, 0)
}
else
{
// Single Infection Mode
g_lastmode = MODE_INFECTION
// Turn player into the first zombie
zombieme(id, 0, 0, 0, 0, 0)
}
// Remaining players should be humans (CTs)
for (id = 1; id <= g_maxplayers; id++)
{
// Not alive
if (!g_isalive[id])
continue;
// First zombie/nemesis/assassin
if (g_zombie[id])
continue;
// Switch to CT
if (fm_cs_get_user_team(id) != FM_CS_TEAM_CT) // need to change team?
{
remove_task(id+TASK_TEAM)
fm_cs_set_user_team(id, FM_CS_TEAM_CT)
fm_user_team_update(id)
}
}
if (g_nemround)
{
// Play Nemesis sound
ArrayGetString(sound_nemesis, random_num(0, ArraySize(sound_nemesis) - 1), sound, charsmax(sound))
PlaySound(sound);
// Show Nemesis HUD notice
set_hudmessage(255, 20, 20, HUD_EVENT_X, HUD_EVENT_Y, 1, 0.0, 5.0, 1.0, 1.0, -1)
ShowSyncHudMsg(0, g_MsgSync, "%L", LANG_PLAYER, "NOTICE_NEMESIS", g_playername[forward_id])
// Mode fully started!
g_modestarted = true
// Round start forward
ExecuteForward(g_fwRoundStart, g_fwDummyResult, MODE_NEMESIS, forward_id);
}
else if (g_assaround)
{
// Play Assassin sound
ArrayGetString(sound_assassin, random_num(0, ArraySize(sound_assassin) - 1), sound, charsmax(sound))
PlaySound(sound);
// Show Assassin HUD notice
set_hudmessage(255, 255, 20, HUD_EVENT_X, HUD_EVENT_Y, 1, 0.0, 5.0, 1.0, 1.0, -1)
ShowSyncHudMsg(0, g_MsgSync, "%s is Assassin !!!", g_playername[forward_id])
// Mode fully started!
g_modestarted = true
// Round start forward
ExecuteForward(g_fwRoundStart, g_fwDummyResult, MODE_ASSASSIN, forward_id);
}
else
{
// Show First Zombie HUD notice
set_hudmessage(255, 0, 0, HUD_EVENT_X, HUD_EVENT_Y, 0, 0.0, 5.0, 1.0, 1.0, -1)
ShowSyncHudMsg(0, g_MsgSync, "%L",LANG_PLAYER, "NOTICE_FIRST", g_playername[forward_id])
// Mode fully started!
g_modestarted = true
// Round start forward
ExecuteForward(g_fwRoundStart, g_fwDummyResult, MODE_INFECTION, forward_id);
}
}
// Start ambience sounds after a mode begins
if ((g_ambience_sounds[AMBIENCE_SOUNDS_NEMESIS] && g_nemround) || (g_ambience_sounds[AMBIENCE_SOUNDS_ASSASSIN] && g_assaround) || (g_ambience_sounds[AMBIENCE_SOUNDS_SURVIVOR]
&& g_survround) || (g_ambience_sounds[AMBIENCE_SOUNDS_SNIPER] && g_snipround) ||
(g_ambience_sounds[AMBIENCE_SOUNDS_SWARM] && g_swarmround) || (g_ambience_sounds[AMBIENCE_SOUNDS_PLAGUE] && g_plagueround) || (g_ambience_sounds[AMBIENCE_SOUNDS_ARMAGEDDON]
&& g_armageround) || (g_ambience_sounds[AMBIENCE_SOUNDS_APOCALYPSE] && g_apocround) || (g_ambience_sounds[AMBIENCE_SOUNDS_NIGHTMARE] && g_nightround) || (g_ambience_sounds[AMBIENCE_SOUNDS_INFECTION] && !g_nemround && !g_assaround && !g_survround && !g_snipround
&& !g_swarmround && !g_plagueround && !g_armageround && !g_apocround && !g_nightround))
{
remove_task(TASK_AMBIENCESOUNDS)
set_task(2.0, "ambience_sound_effects", TASK_AMBIENCESOUNDS)
}
}