问题已经解决,分享一下,顺便帮一下还不会修改的。
打开zp代码查找:// Single Infection Mode or Nemesis Mode
找到后,可以在这段文字上面找到else这个词.
从这个else的{开始到这个else的}结束,把中间的内容改为如下:
else
{
// Single Infection Mode or Nemesis Mode
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)
{
// Choose player randomly?
if (mode == MODE_NONE)
id = fnGetRandomAlive(random_num(1, iPlayersnum))
// Remember id for calling our forward later
forward_id = id
// Nemesis Mode
g_nemround = true
g_lastmode = MODE_NEMESIS
// Turn player into nemesis
zombieme(id, 0, 1, 0, 0)
// 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 (iPlayersnum>29) iMaxZombies=3
else if (iPlayersnum>9) iMaxZombies=2
else iMaxZombies=1
iZombies=0
// Single Infection Mode
g_lastmode = MODE_INFECTION
while (iZombies<iMaxZombies)
{
id = fnGetRandomAlive(random_num(1, iPlayersnum))
if (g_zombie[id]) continue
// Turn player into the first zombie
zombieme(id, 0, 0, 0, 0)
iZombies++
// Show First Zombie HUD notice
set_hudmessage(255, 0, 0, HUD_EVENT_X, HUD_EVENT_Y+float(iZombies)*0.02-0.02, 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, 0);
}
}
// Remaining players should be humans (CTs)
for (id = 1; id <= g_maxplayers; id++)
{
// Not alive
if (!g_isalive[id])
continue;
// First zombie/nemesis
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)
}
}
如此一来开局后会出现1、2、3个僵尸,但只有1个是母体。而且可能会有bug(这个我没法修复)
为了让3个僵尸全部是母体,接下来查找内容:// Set zombie attributes based on the mode
往下看有一个else if (fnGetZombies() == 1)
把这段文字改为else if (!infector && !silentmode && !rewards)
然后保存退出。