下面是引用 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的 只要位置没错就好