AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   menu_create() function with ML (https://forums.alliedmods.net/showthread.php?t=108836)

shadow.hk 11-10-2009 05:31

menu_create() function with ML
 
*delete this thread - didn't read the function properly*

Arkshine 11-10-2009 05:37

Re: menu_create() function with ML
 
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; }

shadow.hk 11-10-2009 05:51

Re: menu_create() function with ML
 
k, thanks for the info.


All times are GMT -4. The time now is 17:41.

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