Menu Staying On The Same Page After Selection?
I love this Fort spawner plugin for L4D2 (http://forums.alliedmods.net/showthread.php?t=129603). The only problem with it is that everytime you make a selection, it'll return you to the first page of that particular sub-menu. Now, I did some searching and some suggested using this
But it didn't help at all, now instead returning to the first page of that particular sub-menu, it'll return to the top menu, and there is a error on the server console:
Here is the part of the code that I think I need to somehow modify (you can download the whole plugin sourcecode from that link above):
So pretty much the only thing I changed was
to
Now obiously I'm very new to this whole scripting thing so any help would be greatly appreciated :)
PHP Code:
DisplayMenuAtItem(menu, param1, GetMenuSelectionPosition(), 60);
PHP Code:
L 11/13/2011 - 13:07:07: [SM] Native "CloseHandle" reported: Handle 3250266 is invalid (error 3)
L 11/13/2011 - 13:07:07: [SM] Displaying call stack trace for plugin "fortspawner2.smx":
L 11/13/2011 - 13:07:07: [SM] [0] Line 616, /home/groups/sourcemod/upload_tmp/phpmgDih9.sp::MenuHandler_MostUsedMenu()
PHP Code:
DisplayMostUsedMenu(client) {
new Handle:menu = CreateMenu(MenuHandler_MostUsedMenu);
SetMenuTitle(menu, "Most Used");
//removed add menu items to save space on this quote
SetMenuExitBackButton(menu, true);
DisplayMenu(menu, client, MENU_TIME_FOREVER);
}
public MenuHandler_MostUsedMenu(Handle:menu, MenuAction:action, param1, param2)
{
if (action == MenuAction_End){
CloseHandle(menu);
}
else if (action == MenuAction_Select){
decl String:info[128];
GetMenuItem(menu, param2, info, sizeof(info));
FakeClientCommand(param1, info);
DisplayMenuAtItem(menu, param1, GetMenuSelectionPosition(), 60);
}
else if (action == MenuAction_Cancel){
DisplayMainBuildMenu(param1);
}
}
PHP Code:
DisplayMostUsedMenu(param1);
PHP Code:
DisplayMenuAtItem(menu, param1, GetMenuSelectionPosition(), 60);
Orignal From: Menu Staying On The Same Page After Selection?
Post a Comment