View Single Post
Roger Devil
Senior Member
Join Date: Dec 2004
Location: Germany
Old 07-21-2006 , 09:07   Re: Counter Strike Bot Control
Reply With Quote #19

Hi,
Sorry have wriiten it in german. Your plugin has a bug in the following code, preventing other plugins to show their menu :
Code:
	if (strcmp(command,"menuselect") == 0)
	{
		char *arg1 = m_Engine->Cmd_Argv(1);
		//catch menu commands
		if (arg1)
		{
			int arg = atoi(arg1);
			if(arg < 1 || arg > 10) // Make sure makes no invalid selection.
				return;

			g_MenuMngr.MenuChoice(id, arg);
			RETURN_META(MRES_SUPERCEDE);
		}
	}
You have to add a check if BotControl has a menu opened, otherwise ignore the menuselect-command to give the other plugin the possiblity to react.
The bug was reported with with my Clanmatch-Plugin.
Please change the code.....

Last edited by Roger Devil; 07-21-2006 at 15:13.
Roger Devil is offline
Send a message via ICQ to Roger Devil