Menu Problems (Next Page)
Code:
stock ChooseHero(id)
{
new menu[192]
new keys = MENU_KEY_0|MENU_KEY_1|MENU_KEY_2|MENU_KEY_3 | MENU_KEY_4 | MENU_KEY_5 | MENU_KEY_6 | MENU_KEY_7 | MENU_KEY_8
format(menu, 191, "Hero Mod: Choose Hero^n^n1. The Flash^n2. Nightcrawler^n3. The Shell^n4. Magneto^n5. Superman^n6. Mole^n7. The Punisher^n8. Next Page^n^n0. Exit")
show_menu(id, keys, menu, -1, "menu_ChooseHero")
return PLUGIN_CONTINUE
}
public DoChooseHero(id, keys)
{
get_user_name(id,username2[id],31)
get_user_name(id, username[id],31)
if(keys == 0) {
if(PlayerClass[id] == CLASS_THEFLASH) {
client_print(id, print_chat, "[Hero Mod] You are already The Flash! Choose something else!")
ChooseHero(id)
return PLUGIN_HANDLED
}
PlayerClass[id] = CLASS_THEFLASH
remove_task(id)
client_print(id, print_chat, "[Hero Mod] You are now The Flash! Bind +speed2 to run fast")
}
if(keys == 1) {
if(PlayerClass[id] == CLASS_NIGHTCRAWLER) {
client_print(id, print_chat, "[Hero Mod] You are already Nightcrawler! Choose something else!")
ChooseHero(id)
return PLUGIN_HANDLED
}
PlayerClass[id] = CLASS_NIGHTCRAWLER
remove_task(id)
client_print(id, print_chat, "[Hero Mod] You are now Nightcrawler! Bind +blink to use teleport")
}
if(keys == 2) {
if(PlayerClass[id] == CLASS_THESHELL) {
client_print(id, print_chat, "[Hero Mod] You are already The Shell! Choose something else!")
ChooseHero(id)
return PLUGIN_HANDLED
}
PlayerClass[id] = CLASS_THESHELL
remove_task(id)
client_print(id, print_chat, "[Hero Mod] You are now The Shell! Bind +shell to use his power")
}
if(keys == 3) {
if(PlayerClass[id] == CLASS_MAGNETO) {
client_print(id, print_chat, "[Hero Mod] You are already Magneto Choose something else!")
ChooseHero(id)
return PLUGIN_HANDLED
}
PlayerClass[id] = CLASS_MAGNETO
remove_task(id)
client_print(id, print_chat, "[Hero Mod] You are now Magneto! Bind +drop to use his power")
}
if(keys == 4) {
if(PlayerClass[id] == CLASS_SPIDERMAN) {
client_print(id, print_chat, "[Hero Mod] You are already Superman Choose something else!")
ChooseHero(id)
return PLUGIN_HANDLED
}
PlayerClass[id] = CLASS_SPIDERMAN
remove_task(id)
get_user_name(id,username,31)
client_print(id, print_chat, "[Hero Mod] You are now Superman! Bind +fly2 to use his power")
}
if(keys == 5) {
if(PlayerClass[id] == CLASS_MOLE) {
client_print(id, print_chat, "[Hero Mod] You are already Mole Choose something else!")
ChooseHero(id)
return PLUGIN_HANDLED
}
PlayerClass[id] = CLASS_MOLE
remove_task(id)
client_print(id, print_chat, "[Hero Mod] You are now Mole! Bind +mole to use his power")
}
if(keys == 6) {
if(PlayerClass[id] == CLASS_THEPUNISHER) {
client_print(id, print_chat, "[Hero Mod] You are already The Punisher Choose something else!")
ChooseHero(id)
return PLUGIN_HANDLED
}
PlayerClass[id] = CLASS_THEPUNISHER
remove_task(id)
client_print(id, print_chat, "[Hero Mod] You are now The Punisher! You have Unlimmited Ammo now!")
}
if(keys == 7) {
if(PlayerClass[id] == CLASS_BEAST) {
client_print(id, print_chat, "[Hero Mod] You are already Beast Choose something else!")
ChooseHero(id)
return PLUGIN_HANDLED
}
PlayerClass[id] = CLASS_BEAST
remove_task(id)
client_print(id, print_chat, "[Hero Mod] You are now Beast! Bind +superjump to use his power!")
}
return PLUGIN_HANDLED
}
Hello Everyone,
Heres my problem... i dont really know how to add a next page for more options to this menu... can anyone help me out there?
(Got this part from the XP Plugin tutorial)
|