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

[SOLVED] block a special option in admin menu for someone


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Visual77
Veteran Member
Join Date: Jan 2009
Old 02-25-2012 , 06:23   [SOLVED] block a special option in admin menu for someone
Reply With Quote #1

how would I block a certain menu option from someone based on admin flag without blocking the entire menu section for him?

lets say that the guy has a weapon spawn menu under his admin menu and option five in that menu allows him to spawn a grenade launcher.
how can I change so option five only works with root admins?

I have tried the admin overrides but it dosn't quite work. I can block the entire menu in admin overrides with "sm_spawn_weapons" "z" , but then he won't be able to spawn weapons at all. I also tried "sm_spawn_weapons grenade_launcher" "z" in the admin overrides but that dosn't remove the option in the menu and he is still able to spawn grenade launchers.

so what do I do next? I don't want the grenade launcher option from the menu gone, just want it to work with a higher admin flag (root)

Last edited by Visual77; 02-25-2012 at 08:49.
Visual77 is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 02-25-2012 , 08:03   Re: block a special option in admin menu for someone
Reply With Quote #2

What plugin ? And have you made menu in adminmenu_custom.txt or is it from plugin ?

Admin overrides work but not way you want.
sm_spawn_weapons is just admin command and you just give parameters (grenade_launcher).

If you want separate this one weapon from all weapons, need edit plugin.
Bacardi is offline
Visual77
Veteran Member
Join Date: Jan 2009
Old 02-25-2012 , 08:12   Re: block a special option in admin menu for someone
Reply With Quote #3

http://forums.alliedmods.net/showthread.php?t=81892

I have modified it for L4D2, adding all the missing weapons etc but the source is still identical to the first post.

so you are saying that I can't keep the grenade launcher in the weapon menu with all the other weapons, and still hide it from other admins? that I have to edit the source and create a new menu for just the grenade launcher and add the z flag to it? I kinda wanted it to be in the same menu as all the other weapons

Last edited by Visual77; 02-25-2012 at 08:19.
Visual77 is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 02-25-2012 , 08:22   Re: block a special option in admin menu for someone
Reply With Quote #4

You could edit on DisplayWeaponsMenu(client) callback.
When it create menu items

something like this using CheckCommandAccess
Spoiler

And in this example, you can override separatelly with admin access "sm_oxygentank_access"
Bacardi is offline
Visual77
Veteran Member
Join Date: Jan 2009
Old 02-25-2012 , 08:28   Re: block a special option in admin menu for someone
Reply With Quote #5

that's interesting. I'll try a.s.a.p with the CUSTOM2 flag (P)
and report back to you
Visual77 is offline
Visual77
Veteran Member
Join Date: Jan 2009
Old 02-25-2012 , 08:48   Re: block a special option in admin menu for someone
Reply With Quote #6

works beutifuly. thanks again Bacardi. problem solved
Visual77 is offline
Reply



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 04:32.


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