zp 模式問題

Home Home
引用 | 編輯 10120091119
2010-08-16 18:34
樓主
推文 x0
怎樣把倖存者模式變1名倖存改做變3名倖存表情
刪除1人感染模式 表情

拜託

獻花 x0
引用 | 編輯 a7811311622
2010-08-16 22:30
1樓
  
下面是引用 10120091119 於 2010-08-16 18:34 發表的 zp 模式問題: 到引言文
怎樣把倖存者模式變1名倖存改做變3名倖存表情
刪除1人感染模式 表情

拜託

「把倖存者模式變1名倖存改做變3名倖存」:
將「make_a_zombie(mode, id)」裡原本的
複製程式
  // 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)
  
  // Turn the remaining players into zombies
  for (id = 1; id <= g_maxplayers; id++)
  {
   // Not alive
   if (!is_user_alive(id))
    continue;
   
   // Survivor or already a zombie
   if (g_survivor[id] || g_zombie[id])
    continue;
   
   // Turn into a zombie
   zombieme(id, 0, 0, 1)
  }
  
  // Play survivor sound
  PlaySound(sound_survivor[random_num(0, sizeof sound_survivor -1)]);
  
  // Get player's name
  get_user_name(forward_id, name, sizeof name - 1)
  
  // 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", name)
改成
複製程式
  // 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)
   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)
   iSurvivors++
  }
  
  // Turn the remaining players into zombies
  for (id = 1; id <= g_maxplayers; id++)
  {
   // Not alive
   if (!is_user_alive(id))
    continue;
   
   // Survivor or already a zombie
   if (g_survivor[id] || g_zombie[id])
    continue;
   
   // Turn into a zombie
   zombieme(id, 0, 0, 1)
  }
  
  // Play survivor sound
  PlaySound(sound_survivor[random_num(0, sizeof sound_survivor -1)]);
  
  // Get player's name
  for (iSurvivors = 0; iSurvivors < 3; iSurvivors++) // iSurvivors後面的數字代表你想出現的人數
   get_user_name(forward_id[iSurvivors], forward_name[iSurvivors], sizeof forward_name[] - 1)
  
  // 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", forward_name[0], LANG_PLAYER, "NOTICE_SURVIVOR", forward_name[1], LANG_PLAYER, "NOTICE_SURVIVOR", forward_name[2])
  // 以上使用三次「, LANG_PLAYER, "NOTICE_SURVIVOR", forward_name[人數]」代表會顯示3行誰變成倖存者的字幕
之後再將「public fw_TakeDamage(victim, inflictor, attacker, Float:damage, damage_type)」裡的
複製程式
 // Last human or swarm round or plague round
 if (g_swarmround || g_plagueround || fnGetHumans() == 1)
  return HAM_IGNORED; // human is killed
改成
複製程式
 // Last human or swarm round or plague round
 if (g_survround || g_swarmround || g_plagueround || fnGetHumans() == 1)
  return HAM_IGNORED; // human is killed


獻花 x2
引用 | 編輯 10120091119
2010-08-16 23:12
2樓
  
為什麼轉不了..很多error 表情

獻花 x0
引用 | 編輯 a7811311622
2010-08-16 23:39
3樓
  
下面是引用 10120091119 於 2010-08-16 18:34 發表的 zp 模式問題: 到引言文
怎樣把倖存者模式變1名倖存改做變3名倖存表情
刪除1人感染模式 表情

拜託

「刪除1人感染模式」:
將「make_a_zombie(mode, id)」裡原本的
複製程式
  else
  {
   // Single Infection Mode
   g_lastmode = MODE_INFECTION
   
   // Turn player into the first zombie
   zombieme(id, 0, 0, 0)
  }
改成
複製程式
  else
  {
   make_a_zombie(MODE_NONE, 0)
   return;
  }


獻花 x0
引用 | 編輯 a7811311622
2010-08-16 23:41
4樓
  
下面是引用 10120091119 於 2010-08-16 23:12 發表的 : 到引言文
為什麼轉不了..很多error 表情

如果你是用「複製程式」那按鈕的話…應該只會出現警告才對…
會有ERROR…大概是你的ZP版本是4.3或是你根本沒改好…

獻花 x0
引用 | 編輯 AykinDalike
2010-08-17 09:09
5樓
  
其實不用在make_a_zombie裡改
直接到survivor_mode底下加入humanme(id, 1)即可

且還能設定條件為伺服器滿多少人有多少倖存者

獻花 x0
引用 | 編輯 a7811311622
2010-08-17 10:28
6樓
  
下面是引用 AykinDalike 於 2010-08-17 09:09 發表的 : 到引言文
其實不用在make_a_zombie裡改
直接到survivor_mode底下加入humanme(id, 1)即可

且還能設定條件為伺服器滿多少人有多少倖存者

survivor_mode?這是ZP 4.3 的public嗎?表情

獻花 x0
引用 | 編輯 AykinDalike
2010-08-17 12:11
7樓
  
下面是引用 a7811311622 於 2010-08-17 10:28 發表的 : 到引言文

survivor_mode?這是ZP 4.3 的public嗎?表情



這部分在ZP各版本都一樣
仔細看了你提供的方法
跟我說的是同一個概念  XD

當我沒說好了...呵

獻花 x0
引用 | 編輯 a7811311622
2010-08-17 12:19
8樓
  
下面是引用 AykinDalike 於 2010-08-17 12:11 發表的 : 到引言文



這部分在ZP各版本都一樣
仔細看了你提供的方法
跟我說的是同一個概念  XD

當我沒說好了...呵

我那段是修改有關「MODE_SURVIVOR」裡的內容…
所以大大說的「survivor_mode」意指「MODE_SURVIVOR」囉?

獻花 x0
引用 | 編輯 aesoph0456
2010-08-17 16:12
9樓
  
上面的大大說的話太過難明 能不能說清楚點?

獻花 x0
引用 | 編輯 a7811311622
2010-08-17 16:23
10樓
  
下面是引用 aesoph0456 於 2010-08-17 16:12 發表的 : 到引言文
上面的大大說的話太過難明 能不能說清楚點?

我說的已經夠清楚了…
不明就代表你對ZP主插件不了解…
或是不懂得善用搜尋功能…
也可能是嫌字太多不想看而說看不懂…
表情 表情 表情

獻花 x0
引用 | 編輯 10120091119
2010-08-17 18:17
11樓
  
下面是引用 AykinDalike 於 2010-08-17 09:09 發表的 : 到引言文
其實不用在make_a_zombie裡改
直接到survivor_mode底下加入humanme(id, 1)即可

且還能設定條件為伺服器滿多少人有多少倖存者

怎樣設定為伺服器滿多少人就有多少倖存表情
改那個數字

獻花 x0
引用 | 編輯 c7352458
2010-08-18 14:34
12樓
  
你可以造3樓的

獻花 x0
引用 | 編輯 10120091119
2010-08-19 20:17
13樓
  
 改過了..還是很多ERROR...

本帖包含附件
檔名: zip zombie_plague411.rar   (2022-06-09 14:16 / 59 KB)  
幫我看有沒有改錯..我已跟足= =
下載次數:1 需要威望:50


獻花 x0
引用 | 編輯 a7811311622
2010-08-20 00:35
14樓
  
下面是引用 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行誰變成倖存者的字幕 


獻花 x1
引用 | 編輯 10120091119
2010-08-20 02:41
15樓
  
還是有3 error 表情 表情

獻花 x1
引用 | 編輯 ReZa
2010-08-20 02:49
16樓
  
- -我可以教你你是著去看看錯誤是哪些行數
然後再去找你去改ZP那邊文字找尋有沒有類似

在做統稱修改 表情

獻花 x0