Raised This Month: $ Target: $400
 0% 

menu_create() function with ML


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
shadow.hk
Senior Member
Join Date: Dec 2008
Location: WA, Australia
Old 11-10-2009 , 05:31   menu_create() function with ML
Reply With Quote #1

*delete this thread - didn't read the function properly*

Last edited by shadow.hk; 11-10-2009 at 05:36. Reason: ...
shadow.hk is offline
Send a message via MSN to shadow.hk
Old 11-10-2009, 05:32
Arkshine
This message has been deleted by Arkshine. Reason: nvm
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
shadow.hk
Senior Member
Join Date: Dec 2008
Location: WA, Australia
Old 11-10-2009 , 05:51   Re: menu_create() function with ML
Reply With Quote #4

k, thanks for the info.
shadow.hk is offline
Send a message via MSN to shadow.hk
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 17:41.


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