This site is a testing version, but all data is shared with the live forum.


Raised This Month: $ Target: $400
 0% 

how do i add more options to the adminmenu ?


Post New Thread Reply   
 
Thread Tools Display Modes
bl4nk
SourceMod Developer
Join Date: Jul 2007
Old 06-05-2008 , 22:19   Re: how do i add more options to the adminmenu ?
Reply With Quote #21

Why are you trying to add sm_kick onto the menu when it's already under PlayerCommands?
bl4nk is offline
Freelancer
Senior Member
Join Date: Jun 2007
Location: Bristol , uk
Old 06-06-2008 , 07:42   Re: how do i add more options to the adminmenu ?
Reply With Quote #22

Am still having problems admins with out the proper flag still being able to see and excute.
Freelancer is offline
McRIot
Junior Member
Join Date: Nov 2007
Old 06-24-2008 , 17:14   Re: how do i add more options to the adminmenu ?
Reply With Quote #23

Could someone please explain to me why this is not working? I have tried a number of variations, even tried giving it's own root menu but it won't even show up on the menu. Am I missing something in the code? Do I need any particular plugin enabled? I'm very new to this and have been scraping information on how to do this off this site, forums and the wiki. Any extra help would be appreciated. I am running the latest SourceMod 1.0.2 I believe.

update: After restarting the server the command showed up in the menu. However, it fails to start when I hit the option Run which leads me to believe theirs an error in the code that should initiate the command as a vote. Attempting to troubleshoot, still any assistance would be helpful.

adminmenu_custom.txt
Code:
"Commands"
{
    "VotingCommands"
    {
        "Scamble Teams"
        {
            "cmd"        "mp_scrambleteams #1"
            "1"
            {
                "type"         "list"
                "title"        "Scamble Teams:"
                "1"        "1"
                "1."        "Run"
                "1*"        "sm_ban"
            }
        }
    }
}
adminmenu_sorting.txt
Code:
"Menu"
{

    "PlayerCommands"
    {
        "item"        "sm_kick"
        "item"        "sm_ban"
        "item"        "sm_gag"
    }

    "ServerCommands"
    {
        "item"        "sm_map"
        "item"        "sm_execcfg"
        "item"        "sm_reloadadmins"
    }

    "VotingCommands"
    {
        "item"        "sm_cancelvote"
        "item"        "sm_votemap"
        "item"        "sm_votekick"
        "item"        "sm_voteban"
        "item"        "Scramble Teams"
    }
}

Last edited by McRIot; 06-24-2008 at 17:32.
McRIot is offline
pRED*
Join Date: Dec 2006
Old 06-24-2008 , 19:36   Re: how do i add more options to the adminmenu ?
Reply With Quote #24

This will run the command on your tf2, not the server.

add the param

"execute" "server"

or make the command "sm_cvar mp_scrambleteams #1"
pRED* is offline
McRIot
Junior Member
Join Date: Nov 2007
Old 06-24-2008 , 22:31   Re: how do i add more options to the adminmenu ?
Reply With Quote #25

Quote:
Originally Posted by pRED* View Post
This will run the command on your tf2, not the server.

add the param

"execute" "server"

or make the command "sm_cvar mp_scrambleteams #1"
thanks pRED

also one other question..

how can I turn this into a vote? I assume I need another function to start first that calls for the cvar. I'm not a strong coder or I would code it myself but if I can be pointed in the right direction I can probably figure it out.
McRIot is offline
willy1234x1
Senior Member
Join Date: Jun 2008
Old 06-25-2008 , 07:28   Re: how do i add more options to the adminmenu ?
Reply With Quote #26

Quote:
Originally Posted by Freelancer View Post
Ive come across a problem with admin who dont have the admin flag (sm_ban) being able to see the custom menu and even being able to see some of the sub menus.

Also the last option (scamble teams) being able to see it and also being able to excute it, got around this by adding a * "sm_bans" to stop them from excuting it. but they are still able to see it as a option to use.

Question's

1) How can I stop lower admin from seeing the custom menu option?
ie "[Ci] Commands" whole menu, see file attached.

2) How can I remove the voting options from the admin menu?

really loving the new stuff. keep up the great work.
You can remove them by deleting them from the txt files. You can make it so a lower admin doesn't see the custom menu by adding an override to the menu or making a flag requirement for it.
willy1234x1 is offline
allenelson
Junior Member
Join Date: May 2008
Old 07-03-2008 , 15:59   Re: how do i add more options to the adminmenu ?
Reply With Quote #27

i've upgraded to the latest snapshot again in case there was an update. menu options are still not appearing.

could client preferences have anything to do with this ?

11 <Failed> "Client Preferences" (1.1.0-svn) by AlliedModders LLC

15:58:58 [SM] Listing 21 plugins:
01 "Fun Votes" (1.1.0-svn) by AlliedModders LLC
02 "Basic Votes" (1.1.0-svn) by AlliedModders LLC
03 "Ads" (1.0.4.0) by Shane A. ^BuGs^ Froebel
04 "Nextmap" (1.1.0-svn) by AlliedModders LLC
05 "Basic Comm Control" (1.1.0-svn) by AlliedModders LLC
06 "Basic Chat" (1.1.0-svn) by AlliedModders LLC
07 "Basic Ban Commands" (1.1.0-svn) by AlliedModders LLC
08 "Admin Help" (1.1.0-svn) by AlliedModders LLC
09 "Cloak Syphon" (1.1) by Muridias
10 "TF2 Fast Respawns" (1.0.5) by WoZeR
11 <Failed> "Client Preferences" (1.1.0-svn) by AlliedModders LLC
12 "Admin Menu" (1.1.0-svn) by AlliedModders LLC
13 "Reserved Slots" (1.1.0-svn) by AlliedModders LLC
14 "Admin File Reader" (1.1.0-svn) by AlliedModders LLC
15 "Fun Commands" (1.1.0-svn) by AlliedModders LLC
16 "Basic Info Triggers" (1.1.0-svn) by AlliedModders LLC
17 "Basic Commands" (1.1.0-svn) by AlliedModders LLC
18 "Anti-Flood" (1.1.0-svn) by AlliedModders LLC
19 "SlapSlay Commands" (1.1.0-svn) by AlliedModders LLC
20 "MapChooser" (1.1.0-svn) by AlliedModders LLC
21 "Rock The Vote" (1.1.0-svn) by AlliedModders LLC




16:00:53 L 07/03/2008 - 16:00:53: rcon from "209.50.186.225:1157": command "sm plugins load clientprefs"
16:00:53 [SM] Plugin clientprefs.smx failed to load: Required extension "Client Preferences" file("clientprefs.ext") not running.

[tf2@ipfonehome extensions]$ ls
auto.1.ep1 bintools.ext.so dbi.mysql.ext.so geoip.ext.so topmenus.ext.so
auto.2.ep2 clientprefs.ext.so dbi.sqlite.ext.so regex.ext.so

drwxrwxr-x 4 tf2 tf2 4096 Jun 3 19:28 .
drwxrwxr-x 11 tf2 tf2 4096 Jun 4 09:54 ..
drwxrwxr-x 2 tf2 tf2 4096 Jun 3 19:28 auto.1.ep1
drwxrwxr-x 2 tf2 tf2 4096 Jun 3 19:28 auto.2.ep2
-rwxr-xr-x 1 tf2 tf2 19440 Jul 3 14:42 bintools.ext.so
-rwxr-xr-x 1 tf2 tf2 76648 Jul 3 14:42 clientprefs.ext.so
-rwxr-xr-x 1 tf2 tf2 2157389 Jul 3 14:42 dbi.mysql.ext.so
-rwxr-xr-x 1 tf2 tf2 612815 Jul 3 14:42 dbi.sqlite.ext.so
-rwxr-xr-x 1 tf2 tf2 36241 Jul 3 14:42 geoip.ext.so
-rwxr-xr-x 1 tf2 tf2 91390 Jul 3 14:42 regex.ext.so
-rwxr-xr-x 1 tf2 tf2 88581 Jul 3 14:42 topmenus.ext.so
__________________

Last edited by allenelson; 07-03-2008 at 16:02.
allenelson is offline
Freelancer
Senior Member
Join Date: Jun 2007
Location: Bristol , uk
Old 07-04-2008 , 05:23   Re: how do i add more options to the adminmenu ?
Reply With Quote #28

Quote:
Originally Posted by willy1234x1 View Post
You can remove them by deleting them from the txt files. You can make it so a lower admin doesn't see the custom menu by adding an override to the menu or making a flag requirement for it.
funny first thing i did was delete all the voting options in the adminmenu_sorting.txt and no voting plugins running but its still a title option in the menu. could it be as simple as haveing the vote flag for admin or Z flag which just shows all menu options. Its not a bug its purley a minor anoying thing so no biggy. As for admin seeing menu options I gave that up but ta for the advice.
Freelancer is offline
Mosalar
Senior Member
Join Date: Jul 2004
Location: Tampa Fl
Old 07-04-2008 , 10:43   Re: how do i add more options to the adminmenu ?
Reply With Quote #29

I'm going to add to Freelancer's request as I'm also finding the same issues. The weird thing that I've notice though is that the base plugins follow the permission settings in the menu, others don't. Here's my scenario, 1.1.0svn, DoD:S, linux. Using supercommands commands for reference. My adminmenu_custom.txt.
Code:
// Custom admin menu commands.
// For more information:
//
// http://wiki.alliedmods.net/Custom_Admin_Menu_%28SourceMod%29
//
// Note: This file must be in Valve KeyValues format (no multiline comments)
//

"Commands"
{
    "PlayerCommands"
	{
	    "Move Player"
		{
			"cmd"		"sm_team #1 #2"
			"admin"			"sm_kick"
			"1"
			{
				"type" 		"player"
			}
			"2"
			{
				"type"		"list"
				"title"		"Team:"
				"1"		"1"
				"1."		"Spectators"
				"2"		"2"
				"2."		"Allies"
				"3"		"3"
				"3."		"Axis"
			}
		}
		"Speed"
		{
		    "cmd"        "sm_speed #1 #2"
			"admin"      "sm_ban"
			"1"
			{
			    "type"    "player"
			}
			"2"
			{
			    "type"    "list"
				"Title"   "Speed"
				"1"       "0.5"
				"1."      "Half"
				"2"       "1.0"
				"2."      "Normal"
				"3"       "2.0"
				"3."      "Double"
				"4"       "3.0"
				"4."      "Triple"
				"5"       "7.0"
				"5."      "Ludicrous"
			}
		}
		"Health"
		{
		    "cmd"        "sm_hp #1 #2"
			"admin"      "sm_ban"
			"1"
			{
			    "type"    "player"
			}
			"2"
			{
			    "type"    "list"
				"Title"   "Health"
				"1"       "1"
				"1."      "1hp"
				"2"       "50"
				"2."      "Half"
				"3"       "200"
				"3."      "Double"
				"4"       "999"
				"4."      "Superman"
			}
		}
		"Bury/Unbury"
		{
		    "cmd"        "sm_bury #1 #2"
			"admin"      "sm_ban"
			"1"
			{
			    "type"    "player"
			}
			"2"
			{
			    "type"    "list"
				"Title"   "Choose"
				"1"       "1"
				"1."      "Bury"
				"2"       "0"
				"2."      "Unbury"
			}
		}
	}
    "ServerCommands"
	{
		"Choose Nextmap"
		{
			"cmd"		 "sm_setnextmap #1"
			"admin"		 "sm_ban"
			"execute"	 "server"
			"1"
			{
				"title"		"Nextmap:"
				"type"		"mapcycle"
				"path"		"/maplist.txt"
			}
		}
		"Nextmap Now"
		{
			"cmd"		 "mp_timelimit 1"
			"admin"		 "sm_ban"
			"execute"	 "server"
		}
		"Accuracy info"
		{
			"cmd"		 "aim_info"
			"admin"		 "sm_kick"
			"execute"	 "player"
		}
		"Swap Teams"
		{
			"cmd"		 "sm_teamswap"
			"admin"	     "sm_kick"
		}
	}
}
The users perms I'm testing this with, <abcjk>. Those users can see all the options in player commands and even go through the menu's down to the last choice. At the end they are told they lack the permissions to use. Now with the server commands they can't see any of the "sm_ban" choices. I thought maybe it was the way I compiled supercommands, so I went back and set the global and all individuals to "sm_ban". They can still see and navigate those choices, but not use the actual command. Last thing I tried was setting overrides, this as well did nothing. Is this a per-plugin bug since the menu follows the perms on base plugins/commands?

Last edited by Mosalar; 07-04-2008 at 10:44. Reason: Bad spelling :-)
Mosalar is offline
Freelancer
Senior Member
Join Date: Jun 2007
Location: Bristol , uk
Old 07-06-2008 , 04:51   Re: how do i add more options to the adminmenu ?
Reply With Quote #30

Re tested with just admin flags abj on the client, but was able to see and excute a sm_ban only menu item.


Code:
"Commands"
{
	"[Ci] Commands"
	{
		"Alltalk"
		{
			"cmd"		"sv_alltalk #1"
			"admin"		"sm_ban"
			"execute"	"server"
			"1"
			{
				"type" 		"onoff"
				"title"		"All talk:"
			}
		}
		"Scamble teams"
		{
			"cmd"		"mp_scrambleteams #1"
			"admin"		"sm_ban"
			"execute"	"server"
			"1"
			{
				"type" 		"list"
				"title"		"Scramble Teams:"
				"1"		"1"
				"1."		"Run"
			}
		}
	}
}
All talk is hidden

BUT

Scambleteams is visiable and excutable with anyone with generic admin flag. where its set for "sm_bans" ?? any ideas very welcome.
Freelancer 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 10:21.


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