下面是引用 ryoson 於 2011-05-09 19:32 發表的 :
不能轉檔
問題在這句:
g_menu_last_data[id][0] = -1 // reset menu code memory
(這句本身沒有的, 是要自行加上嗎?)
還有加幾種屍要這樣加嗎?:
.......
我手邊有的主插是有這個的
看看去掉g_menu_last_data[id][0] = -1 // reset menu code memory能不能轉
還有 不要把我那樓的
複製程式
public menu_zclass(id, menuid, item)
{
// Menu was closed
if (item == MENU_EXIT)
{
menu_destroy(menuid)
//***** (選單頁面記憶)
g_menu_last_data[id][0] = -1 // reset menu code memory
g_menu_last_data[id][1] = -1 // reset menu id memory
return PLUGIN_HANDLED;
}
// Retrieve zombie class id
static buffer[2], dummy, classid
menu_item_getinfo(menuid, item, dummy, buffer, charsmax(buffer), _, _, dummy)
classid = buffer[0]
// Store selection for the next infection
g_zombieclassnext[id] = classid
static name[32]
ArrayGetString(g_zclass_name, g_zombieclassnext[id], name, charsmax(name))
// Show selected zombie class info and stats
zp_colored_print(id, "^x04[ZP]^x01 %L: %s", id, "ZOMBIE_SELECT", name)
zp_colored_print(id, "^x04[ZP]^x01 %L: %d %L: %d %L: %d %L: %d%%", id, "ZOMBIE_ATTRIB1", ArrayGetCell(g_zclass_hp, g_zombieclassnext[id]), id, "ZOMBIE_ATTRIB2", ArrayGetCell(g_zclass_spd, g_zombieclassnext[id]),
id, "ZOMBIE_ATTRIB3", floatround(Float:ArrayGetCell(g_zclass_grav, g_zombieclassnext[id]) * 800.0), id, "ZOMBIE_ATTRIB4", floatround(Float:ArrayGetCell(g_zclass_kb, g_zombieclassnext[id]) * 100.0))
menu_destroy(menuid)
return PLUGIN_HANDLED;
}
直接複製覆蓋 會造成錯誤 另外 你那個限制的寫法是OK的 只要位置沒錯就好