下面是我嘗試自己寫的能力菜單(詳細內容就不多加寫上)
register_menu("Human Point Menu", KEYSMENU, "menu_HPointMenu")
register_menu("Human Point Menu2", KEYSMENU, "menu_HPointMenu2")
public HPointMenu(id)
{
static menu[999], len
len = 0
len += formatex(menu[len], sizeof menu - 1 - len, "標題")
len += formatex(menu[len], sizeof menu - 1 - len, "\y1. 能力")
len += formatex(menu[len], sizeof menu - 1 - len, "\y2. 能力")
len += formatex(menu[len], sizeof menu - 1 - len, "\y3. 能力")
len += formatex(menu[len], sizeof menu - 1 - len, "\y4. 能力")
len += formatex(menu[len], sizeof menu - 1 - len, "\y5. 能力")
len += formatex(menu[len], sizeof menu - 1 - len, "\y6. 能力")
len += formatex(menu[len], sizeof menu - 1 - len, "\y7. 能力")
len += formatex(menu[len], sizeof menu - 1 - len, "\y8. 能力")
len += formatex(menu[len], sizeof menu - 1 - len, "\y9. \w下一頁^n")
show_menu(id, KEYSMENU, menu, -1, "Human Point Menu")
}
public menu_HPointMenu(id,key)
{
switch(key)
{
case 0:
{
}
case 1:
{
}
case 2:
{
}
case 3:
{
}
case 4:
{
}
case 5:
{
}
case 6:
{
}
case 7:
{
}
case 8:
{
HPointMenu2(id)
}
}
}
public HPointMenu2(id)
{
static menu[999], len
len = 0
len += formatex(menu[len], sizeof menu - 1 - len, "標題")
len += formatex(menu[len], sizeof menu - 1 - len, "\y1. 能力")
len += formatex(menu[len], sizeof menu - 1 - len, "\y2. 能力")
len += formatex(menu[len], sizeof menu - 1 - len, "\y3. 能力")
len += formatex(menu[len], sizeof menu - 1 - len, "\y4. 能力")
len += formatex(menu[len], sizeof menu - 1 - len, "\y5. 能力")
len += formatex(menu[len], sizeof menu - 1 - len, "\y6. 能力")
len += formatex(menu[len], sizeof menu - 1 - len, "\y7. 能力")
len += formatex(menu[len], sizeof menu - 1 - len, "\y8. 能力")
len += formatex(menu[len], sizeof menu - 1 - len, "\y9. \w上一頁^n")
show_menu(id, KEYSMENU, menu, -1, "Human Point Menu2")
}
public menu_HPointMenu2(id,key)
{
switch(key)
{
case 0:
{
}
case 1:
{
}
case 2:
{
}
case 3:
{
}
case 4:
{
}
case 5:
{
}
case 6:
{
}
case 7:
{
}
case 8:
{
HPointMenu(id)
}
}
}
但是測試後上下頁的功能會重疊
就是如果選第一頁的1
第二頁的1也會跟著一起點....
教學區也沒有教上下頁的寫法....
我想請問要如何把這兩頁合併改成像ZP喪屍類型&武器選擇那種上下頁的菜單類型??