AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   How can i have 2 Pages on my menu ? (https://forums.alliedmods.net/showthread.php?t=146870)

MyDooMJr 01-02-2011 10:47

How can i have 2 Pages on my menu ?
 
Hey guys,

I have an question and i hope it can be fixed :)

I want to add Next and Back Function

Code:
#include <amxmodx> #include <amxmisc> public plugin_init() {     register_plugin("Plugin","1.0","KuNh4")     register_menucmd(register_menuid("Menu_Example"),1023,"Menu_1"); }  public Menu_1(id)  {     static szMenuBody[256];     if(!szMenuBody[0])     {         new len = format(szMenuBody,255,"\rExample:^n");         len += format(szMenuBody[len],255-len,"^n\y1. Radio");         len += format(szMenuBody[len],255-len,"^n\y2. Shop");         len += format(szMenuBody[len],255-len,"^n\y7. Next");         len += format(szMenuBody[len],255-len,"^n\y8. Back");         len += format(szMenuBody[len],255-len,"^n\y9. Exit");     }     new keys = |1<<1|1<<2|1<<3|1<<4|1<<5|1<<6|;     show_menu(id,keys,szMenuBody,-1,"Menu_Example");  }  public Menu_Example(id,key)  {     switch(key)     {         case 1:         {             show_motd(id,"radio.txt","Radio")         }         case 2:         {             client_cmd(id,"shop")         }     }  }

How can i do that ?
Thx !

Regards ^^,

EDITED : CAN YOU GUYS FIX MY CODE PLEASE ? REgarDs !

wrecked_ 01-02-2011 11:23

Re: How can i have 2 Pages on my menu ?
 
Look at plugins that have this style of menu creation. Off the top of my head I know that Blockmaker by Necro uses it and has multiple pages.

MyDooMJr 01-02-2011 11:51

Re: How can i have 2 Pages on my menu ?
 
Ok thank you for the answer, i checked and im still learning AMXX Coding :'(

I still waiting for others want to reply here for help too :)

Thank you

fysiks 01-02-2011 14:50

Re: How can i have 2 Pages on my menu ?
 
If you use the new menu style it will be much easier for you to get multiple pages (because you don't have to do anything!).

MyDooMJr 01-02-2011 15:18

Re: How can i have 2 Pages on my menu ?
 
Thank you.


All times are GMT -4. The time now is 02:09.

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