View Single Post
Emp`
AMX Mod X Plugin Approver
Join Date: Aug 2005
Location: Decapod 10
Old 05-22-2009 , 21:12   Re: New AMXX Menu System
Reply With Quote #102

Quote:
Originally Posted by Drak View Post
The Item Param seems to send off "0-MAX_ITEMS". Why do we do "menu_additem(Menu,"Text","1");"?

This simply works:
Code:
new Menu = menu_create("Hello World","_MyMenu"); menu_addtext(Menu,"Test"); public _MyMenu(id,Menu,Item) {     switch(Item)     {         case 0: client_print(id,print_chat,"Test Selected.");     } }
While that works, the other method gives people a better understanding of the menus for different things. Also, if you want to reorganize a menu, you can just change where it is added, with this method you would need to change where it is added and the code in the handler function.
Emp` is offline
Send a message via AIM to Emp` Send a message via MSN to Emp` Send a message via Yahoo to Emp` Send a message via Skype™ to Emp`