下面是引用 10120091119 於 2010-08-19 20:17 發表的 :
改過了..還是很多ERROR... [attachment=687803]
我不是有說了嗎…?
下面是引用 a7811311622 於 2010-08-16 23:41 發表的:
如果你是用「複製程式」那按鈕的話…應該只會出現警告才對…
會有ERROR…大概是你的ZP版本是4.3或是你根本沒改好…
ZP 4.3 的改法是這樣:
複製程式
// Turn specified amount of players into Survivors
static iSurvivors, forward_id[3], forward_name[3] // forward_id和forward_name矩陣裡的數字代表你想出現的人數
iSurvivors = 0
if (mode != MODE_NONE)
{
// Remember id for calling our forward later
forward_id[iSurvivors] = id
// If not, turn him into one
humanme(id, 1, 0)
iSurvivors++
}
while (iSurvivors < 3) // iSurvivors後面的數字代表你想出現的人數
{
// Choose player randomly?
id = fnGetRandomAlive(random_num(1, iPlayersnum))
// Already a survivor?
if (g_survivor[id])
continue;
// Remember id for calling our forward later
forward_id[iSurvivors] = id
// If not, turn him into one
humanme(id, 1, 0)
iSurvivors++
}
// 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, 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^n%L^n%L", LANG_PLAYER, "NOTICE_SURVIVOR", g_playername[forward_id[0]], LANG_PLAYER, "NOTICE_SURVIVOR", g_playername[forward_id[1]], LANG_PLAYER, "NOTICE_SURVIVOR", g_playername[forward_id[2]])
// 以上使用三次「, LANG_PLAYER, "NOTICE_SURVIVOR", g_playername[forward_id[人數]]」代表會顯示3行誰變成倖存者的字幕