[Half-Life AMXX] / menufront.sma Repository:
ViewVC logotype

Diff of /menufront.sma

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1, Tue Oct 30 09:08:11 2007 UTC revision 17, Fri Nov 16 15:29:57 2007 UTC
# Line 189  Line 189 
189          if (end > g_menusNumber)                // MENUS_NUMBER          if (end > g_menusNumber)                // MENUS_NUMBER
190                  end = g_menusNumber                     // MENUS_NUMBER                  end = g_menusNumber                     // MENUS_NUMBER
191    
         new flags = get_user_flags(id)  
   
192          for (new a = start; a < end; ++a)          for (new a = start; a < end; ++a)
193          {          {
194                  if ((flags & g_menuAccess[a]) && (is_plugin_loaded(g_menuPlugin[a]) != -1))                  if ( access(id, g_menuAccess[a]) &&
195                            ((is_plugin_loaded(g_menuPlugin[a]) != -1) ||                   // search plugins for registered name
196                             (is_plugin_loaded(g_menuPlugin[a], true) != -1)))      // search plugins for filename
197                  {                  {
198                          keys |= (1<<b)                          keys |= (1<<b)
199    
# Line 250  Line 250 
250          if (end > g_clientMenusNumber)                  // MENUS_NUMBER          if (end > g_clientMenusNumber)                  // MENUS_NUMBER
251                  end = g_clientMenusNumber                       // MENUS_NUMBER                  end = g_clientMenusNumber                       // MENUS_NUMBER
252    
         new flags = get_user_flags(id)  
   
253          for (new a = start; a < end; ++a)          for (new a = start; a < end; ++a)
254          {          {
255                  if ((flags & g_clientMenuAccess[a]) && (is_plugin_loaded(g_clientMenuPlugin[a]) != -1))                  if ( access(id, g_clientMenuAccess[a]) &&
256                            ((is_plugin_loaded(g_clientMenuPlugin[a]) != -1) ||                     // search plugins for registered name
257                             (is_plugin_loaded(g_clientMenuPlugin[a], true) != -1)))                // search plugins for file name
258                  {                  {
259                          keys |= (1<<b)                          keys |= (1<<b)
260    
# Line 354  Line 354 
354          register_clcmd("amxmodmenu", "cmdMenu", ADMIN_MENU, "- displays menus")          register_clcmd("amxmodmenu", "cmdMenu", ADMIN_MENU, "- displays menus")
355          register_clcmd("amx_menu", "clientCmdMenu", 0, "- displays menus available to client")          register_clcmd("amx_menu", "clientCmdMenu", 0, "- displays menus available to client")
356    
357          register_srvcmd("amx_addmenuitem", "addmenuitem_cmd", 0, "<menu text> <menu command> <access flags> <plugin name> - Add a menu item to Menus Front-End")          register_srvcmd("amx_addmenuitem", "addmenuitem_cmd", 0, "<menu text> <menu command> <access flags> <plugin name | plugin filename> - Add a menu item to Menus Front-End")
358          register_srvcmd("amx_addclientmenuitem", "addclientmenuitem_cmd", 0, "<menu text> <menu command> <access flags> <plugin name> - Add a menu item to Client Menus Front-End")          register_srvcmd("amx_addclientmenuitem", "addclientmenuitem_cmd", 0, "<menu text> <menu command> <access flags> <plugin name | plugin filename> - Add a menu item to Client Menus Front-End")
359    
360          g_coloredMenus = colored_menus()          g_coloredMenus = colored_menus()
361    

Legend:
Removed from v.1  
changed lines
  Added in v.17

Contact
ViewVC Help
Powered by ViewVC 1.0.4