Код: Выделить всё
public Action:TimerUpdate(Handle:timer)
{
if (!IsServerProcessing())
{
return Action:0;
}
if (GetConVarBool(monsterbotson))
{
if (GetConVarBool(monsternodirector))
{
new anyclient = GetAnyClient();
if (0 < anyclient)
{
DirectorCommand(anyclient, "director_stop");
}
SetConVarInt(FindConVar("director_no_bosses"), 1, false, false);
SetConVarInt(FindConVar("director_no_specials"), 1, false, false);
SetConVarInt(FindConVar("director_no_mobs"), 1, false, false);
}
SetConVarInt(FindConVar("z_max_player_zombies"), 32, false, false);
timertick = timertick + 1;
if (GetConVarInt(monsterinterval) <= timertick)
{
if (GetConVarInt(monstermaxbots) > CountMonsters())
{
new monster = GetConVarInt(monstertype);
switch (monster)
{
case 0:
{
new bot = CreateFakeClient("Monster");
if (bot)
{
new random = GetRandomInt(1, 6);
switch (random)
{
case 1:
{
SpawnCommand(bot, "z_spawn_old", "smoker auto");
}
case 2:
{
SpawnCommand(bot, "z_spawn_old", "boomer auto");
}
case 3:
{
SpawnCommand(bot, "z_spawn_old", "hunter auto");
}
case 4:
{
SpawnCommand(bot, "z_spawn_old", "spitter auto");
}
case 5:
{
SpawnCommand(bot, "z_spawn_old", "jockey auto");
}
case 6:
{
SpawnCommand(bot, "z_spawn_old", "charger auto");
}
default:
{
}
}
}
}
case 1:
{
SpawnCommand(GetAnyClient(), "z_spawn_old", "smoker auto");
}
case 2:
{
SpawnCommand(GetAnyClient(), "z_spawn_old", "boomer auto");
}
case 3:
{
SpawnCommand(GetAnyClient(), "z_spawn_old", "hunter auto");
}
case 4:
{
SpawnCommand(GetAnyClient(), "z_spawn_old", "spitter auto");
}
case 5:
{
SpawnCommand(GetAnyClient(), "z_spawn_old", "jockey auto");
}
case 6:
{
SpawnCommand(GetAnyClient(), "z_spawn_old", "charger auto");
}
case 7:
{
SpawnCommand(GetAnyClient(), "z_spawn_old", "witch auto");
}
case 8:
{
SpawnCommand(GetAnyClient(), "z_spawn_old", "tank auto");
}
case 9:
{
new bot = CreateFakeClient("Monster");
if (bot)
{
new random = GetRandomInt(1, 3);
switch (random)
{
case 1:
{
SpawnCommand(bot, "z_spawn_old", "smoker auto");
}
case 2:
{
SpawnCommand(bot, "z_spawn_old", "boomer auto");
}
case 3:
{
SpawnCommand(bot, "z_spawn_old", "hunter auto");
}
default:
{
}
}
}
}
case 10:
{
new bot = CreateFakeClient("Monster");
if (bot)
{
new random = GetRandomInt(1, 13);
switch (random)
{
case 1, 2, 3:
{
SpawnCommand(bot, "z_spawn_old", "boomer auto");
}
case 4, 5:
{
SpawnCommand(bot, "z_spawn_old", "smoker auto");
}
case 6, 7:
{
SpawnCommand(bot, "z_spawn_old", "hunter auto");
}
case 8, 9, 10:
{
SpawnCommand(bot, "z_spawn_old", "spitter auto");
}
case 11, 12:
{
SpawnCommand(bot, "z_spawn_old", "jockey auto");
}
case 13:
{
SpawnCommand(bot, "z_spawn_old", "charger auto");
}
default:
{
}
}
}
}
case 11:
{
new bot = CreateFakeClient("Monster");
if (bot)
{
new random = GetRandomInt(1, 16);
switch (random)
{
case 1, 2, 3, 4:
{
SpawnCommand(bot, "z_spawn_old", "boomer auto");
}
case 5, 6, 7:
{
SpawnCommand(bot, "z_spawn_old", "smoker auto");
}
case 8, 9, 10:
{
SpawnCommand(bot, "z_spawn_old", "hunter auto");
}
case 11, 12, 13:
{
SpawnCommand(bot, "z_spawn_old", "spitter auto");
}
case 14, 15:
{
SpawnCommand(bot, "z_spawn_old", "jockey auto");
}
case 16:
{
SpawnCommand(bot, "z_spawn_old", "charger auto");
}
default:
{
}
}
}
}
case 12:
{
new SpawnLimits[10];
new allowed_monsters;
SpawnLimits[0] = 0;
SpawnLimits[1] = GetConVarInt(FindConVar("z_smoker_limit"));
SpawnLimits[2] = GetConVarInt(FindConVar("z_boomer_limit"));
SpawnLimits[3] = GetConVarInt(FindConVar("z_hunter_limit"));
SpawnLimits[4] = GetConVarInt(FindConVar("z_spitter_limit"));
SpawnLimits[5] = GetConVarInt(FindConVar("z_jockey_limit"));
SpawnLimits[6] = GetConVarInt(FindConVar("z_charger_limit"));
new i = 1;
while (i <= 32)
{
SpawnLimits[GetClientZC(i)]--;
i++;
}
new i = 1;
while (i < 7)
{
if (SpawnLimits[i] < 1)
{
SpawnLimits[i] = 0;
i++;
}
else
{
allowed_monsters = SpawnLimits[i][allowed_monsters];
i++;
}
i++;
}
if (allowed_monsters)
{
new lottery = GetRandomInt(1, allowed_monsters);
new ZOMBIE_WINNER;
while (0 < lottery)
{
ZOMBIE_WINNER++;
if (SpawnLimits[ZOMBIE_WINNER] <= lottery)
{
lottery -= SpawnLimits[ZOMBIE_WINNER];
}
else
{
lottery = 0;
}
}
new bot = CreateFakeClient("Monster");
if (0 < bot)
{
switch (ZOMBIE_WINNER)
{
case 1:
{
SpawnCommand(bot, "z_spawn_old", "smoker auto");
}
case 2:
{
SpawnCommand(bot, "z_spawn_old", "boomer auto");
}
case 3:
{
SpawnCommand(bot, "z_spawn_old", "hunter auto");
}
case 4:
{
SpawnCommand(bot, "z_spawn_old", "spitter auto");
}
case 5:
{
SpawnCommand(bot, "z_spawn_old", "jockey auto");
}
case 6:
{
SpawnCommand(bot, "z_spawn_old", "charger auto");
}
default:
{
}
}
}
}
}
default:
{
}
}
}
timertick = 0;
}
}
return Action:0;
}