if (zp_get_user_first_zombie(id)) 不能用在多人感染模式

Home Home
引用 | 編輯 [NiGhT]-妖
2014-10-26 17:19
樓主
推文 x0
if (zp_get_user_first_zombie(id)) 不能用在多人感染模式 那到底要用什麼來取得頭幾隻喪屍? 謝謝大大們

獻花 x0
引用 | 編輯 岳岳
2014-10-26 21:10
1樓
  
複製程式
//這裡應該是模式的編號
/* Game modes for zp_round_started() */
enum
{
 MODE_NONE = 0,
 MODE_INFECTION,
 MODE_NEMESIS,
 MODE_ASSASSIN,
 MODE_SURVIVOR,
 MODE_SNIPER,
 MODE_SWARM,
 MODE_MULTI,
 MODE_PLAGUE,
 MODE_LNJ
}

//這個應該是回合開始後用的
/**
 * Called when the ZP round starts, i.e. first zombie
 * is chosen or a game mode begins.
 *
 * @param gamemode Mode which has started.
 * @param id Affected player's index (if applicable).
 */
forward zp_round_started(gamemode, id)

//這個應該是回合開始前
/**
 * Called before the ZP round starts. This is only 
 * called for custom game modes.
 * 
 * Note: The custom game mode id can be used to start
 * the game mode externally
 * 
 * Note: returning ZP_PLUGIN_HANDLED will cause the
 * game mode to be blocked and other game modes will
 * be given a chance.
 * 
 * @param gameid Custom mode id which is called
 */
forward zp_round_started_pre(gameid)
至於gamemode跟id的用法不大清楚...第1種應該是你要的...他的gamemode可以用在多人感染...然後id應該是指受影響的玩家...應該一個判斷就夠了
大概是這樣吧!?
if(zp_round_started(7, id))
{
......
......
......
}

獻花 x0
引用 | 編輯 [NiGhT]-妖
2014-10-27 00:06
2樓
  
沒成功 不過謝謝你 表情

獻花 x0
引用 | 編輯 岳岳
2014-10-27 21:43
3樓
  
下面是引用 [NiGhT]-妖 於 2014-10-27 00:06 發表的 : 到引言文
沒成功 不過謝謝你 表情



呒成功的原因可能在於我給的第1個有錯...gamemode可能不是1....你要自己查看你的zombieplauge.inc看看multy是第幾個


他的編號會依數量而有所不同...我的ZP版本比較不一樣所以可能有誤差

獻花 x0
引用 | 編輯 [NiGhT]-妖
2014-10-29 11:29
4樓
  
的確有不同 表情 但還是不行 表情

獻花 x0
引用 | 編輯 岳岳
2014-10-29 20:08
5樓
  
下面是引用 [NiGhT]-妖 於 2014-10-29 11:29 發表的 : 到引言文
的確有不同 表情 但還是不行 表情



那它應該就是function了


試試看用這個


複製程式
public zp_round_started(gamemode, id)
{
 if(is_user_alive(id) && zp_get_user_zombie(id))
 {
 ......
 ......
 ......
 }
}


獻花 x1