Raised This Month: $ Target: $400
 0% 

[L4D2] Editing the admin menu


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
A1ekin
Member
Join Date: Jul 2021
Old 07-28-2022 , 13:14   [L4D2] Editing the admin menu
Reply With Quote #1

How can I remove some items in the admin menu without changing the admin flag

I'm a server admin and I don't need many menu items like "Set player on fire", "Beacon" or different types of voting in the admin menu, but they are all in basic commands

I want to sort the items myself and remove the excess

I can sort through adminmenu_sorting, but I didn’t find how to remove unnecessary
A1ekin is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 07-28-2022 , 13:47   Re: [L4D2] Editing the admin menu
Reply With Quote #2

Admin system would work better, if you not grant admin flag "Z" to anyone, not even yourself.
It's magical flag, to bypass all admin and immunity check.
Not nice, only mess.

Instead, give yourself all admin letters. abcdefghijklmnopqrst
And you can hide/block commands what you not need behind that flag "z" for example (command override).

- Or another way, create admin group and add yourself in it, use group override "deny"

admin_overrides.cfg
Code:
Overrides
{
	/**
	 * By default, commands are registered with three pieces of information:
	 * 1)Command Name 		(for example, "csdm_enable")
	 * 2)Command Group Name	(for example, "CSDM")
	 * 3)Command Level		(for example, "changemap")
	 *
	 * You can override the default flags assigned to individual commands or command groups in this way.
	 * To override a group, use the "@" character before the name.  Example:
	 * Examples:
	 *		"@CSDM"			"b"				// Override the CSDM group to 'b' flag
	 * 		"csdm_enable"	"bgi"			// Override the csdm_enable command to 'bgi' flags
	 *
	 * Note that for overrides, order is important.  In the above example, csdm_enable overwrites
	 * any setting that csdm_enable previously had.
	 *
	 * You can make a command completely public by using an empty flag string.
	 */


	"sm_beacon"	"z"
	"sm_burn"	"z"
}

If some reason you want let other admin to use these restrict commands.
- Create admin group and set admin into that admin group.
- Use admin group override
Here example myadminexample
Code:
Groups
{
	/**
	 * Allowed properties for a group:
	 *
	 *   "flags"           - Flag string.
	 *   "immunity"        - Immunity level number, or a group name.
	 *						 If the group name is a number, prepend it with an 
	 *						 '@' symbol similar to admins_simple.ini.  Users 
	 *						 will only inherit the level number if it's higher 
	 *						 than their current value.
	 */
	"Default"
	{
		"immunity"		"1"
	}
	
	"Full Admins"
	{
		/**
		 * You can override commands and command groups here.
		 * Specify a command name or group and either "allow" or "deny"
		 * Examples:
		 * 		":CSDM"			"allow"
		 *		"csdm_enable"	"deny"
		 */
		 Overrides
		 {
		 }
		"flags"			"abcdefghiz"

		/* Largish number for lots of in-between values. */
		"immunity"		"99"
	}

	"myadminexample"
	{
		 Overrides
		 {
			"sm_beacon"		"allow"
			"sm_burn"		"allow"
		 }
		"flags"			"abc"

		"immunity"		"10"
	}

}

*edit
Or like always, last option, edit plugin source code and remove menu part.
__________________
Do not Private Message @me

Last edited by Bacardi; 07-28-2022 at 13:50.
Bacardi is offline
A1ekin
Member
Join Date: Jul 2021
Old 07-29-2022 , 02:57   Re: [L4D2] Editing the admin menu
Reply With Quote #3

Quote:
Originally Posted by Bacardi View Post
Instead, give yourself all admin letters. abcdefghijklmnopqrst
And you can hide/block commands what you not need behind that flag "z" for example (command override).
Thank you very much, it really helped me
At the same time, I also removed the funvotes, funcommands and l4d2_mm_adminmenu plugins because I realized that I did not need them

but I have another question:
what if I want some admin commands to exist, but not be available through the admin menu, but only through the console?
in that case, do I need to edit the .sp to pull the addition to the menu from there?

Last edited by A1ekin; 07-29-2022 at 03:00.
A1ekin is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 07-29-2022 , 06:01   Re: [L4D2] Editing the admin menu
Reply With Quote #4

You need edit plugin source code I'm afraid.

Normally you just sort admin menu items, stack unused menu items to last page.
__________________
Do not Private Message @me
Bacardi 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 19:02.


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