Raised This Month: $ Target: $400
 0% 

menu_create() function with ML


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 11-10-2009 , 05:37   Re: menu_create() function with ML
Reply With Quote #3

Quote:
NOTE: ml=1 is not currently enabled.
It's not implemented yet.

Edit : Checked to be sure, params[3] is not used.

Code:
static cell AMX_NATIVE_CALL menu_create(AMX *amx, cell *params) {     int len;     char *title = get_amxstring(amx, params[1], 0, len);     validate_menu_text(title);     char *handler = get_amxstring(amx, params[2], 1, len);     int func = registerSPForwardByName(amx, handler, FP_CELL, FP_CELL, FP_CELL, FP_DONE);         if (func == -1)     {         LogError(amx, AMX_ERR_NOTFOUND, "Invalid function \"%s\"", handler);         return 0;     }     Menu *pMenu = new Menu(title, amx, func);     if (g_MenuFreeStack.empty())     {         g_NewMenus.push_back(pMenu);         pMenu->thisId = (int)g_NewMenus.size() - 1;     } else {         int pos = g_MenuFreeStack.front();         g_MenuFreeStack.pop();         g_NewMenus[pos] = pMenu;         pMenu->thisId = pos;     }     return pMenu->thisId; }
__________________
Arkshine is offline
 



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 17:41.


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