Raised This Month: $51 Target: $400
 12% 

Counter Strike Bot Control


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
EKS
Veteran Member
Join Date: Mar 2004
Location: Norway
Old 07-22-2006 , 10:09   Re: Counter Strike Bot Control
Reply With Quote #9

@Roger Devil
When does this problem happen?
If it happens in this order:
Someone opens BOT menu, then opens the clan menu without closing the BOT menu there is nothing that can be done with this without adding a extra callback to the AdminInterface ( That i can think of). Atm there is no way for a plugin to know when another plugin has opend a menu ontop of another menu.
So admins need to close the menu in 1 plugin before opening it in the next

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.

I do if you look right above that code:
Quote:
if(g_HasMenuOpen[id] == false) <-- This being the magic line that checks if the user has a menu open
RETURN_META(MRES_IGNORED);
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);
}
}

__________________
Github archive for plugins, the repos for the other c++ projects are there to.
EKS 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:29.


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