Raised This Month: $ Target: $400
 0% 

Menu Problems (Next Page)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
ChanT
Junior Member
Join Date: Mar 2006
Old 05-28-2007 , 09:42   Menu Problems (Next Page)
Reply With Quote #1

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)

Last edited by ChanT; 05-28-2007 at 15:34.
ChanT is offline
regalis
Veteran Member
Join Date: Jan 2007
Location: F*cking Germany
Old 05-28-2007 , 09:53   Re: Menu Problems (Next Page)
Reply With Quote #2

Edit your post: Place the code ind [C O D E]...blabla....[/C O D E] tags!
__________________
regalis is offline
ChanT
Junior Member
Join Date: Mar 2006
Old 05-28-2007 , 15:35   Re: Menu Problems (Next Page)
Reply With Quote #3

okay done that...
ChanT is offline
regalis
Veteran Member
Join Date: Jan 2007
Location: F*cking Germany
Old 05-28-2007 , 16:02   Re: Menu Problems (Next Page)
Reply With Quote #4

I would help if i would be good with menus, but im suck at menustuff...
The only thing that i can think of is that you have to create the next page and check if key 0 is pressed and then show the next page menu..0o

My keys look like that
Code:
nKeys = (1<<9)|(1<<7)|(1<<1)|(1<<0);

(1<<9) is key 0
(1<<7) is key 8
(1<<1) is key 2
and (1<<0) is key 1
i hope this helps a little !?

greetz regalis
__________________
regalis is offline
ChanT
Junior Member
Join Date: Mar 2006
Old 05-29-2007 , 12:44   Re: Menu Problems (Next Page)
Reply With Quote #5

Hm nah it didnt really helped me anyone else who is good with menus?
ChanT is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 10:44.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode