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

Custom Admin Menu (CS:GO) -> Group Maps


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
W0rm
Junior Member
Join Date: May 2007
Old 08-10-2017 , 21:22   Custom Admin Menu (CS:GO) -> Group Maps
Reply With Quote #1

Hello Guys, I tried to make a custom menu for Sourcemod which groups maps togheter.

So we got:

PlayerCommands
ServerCommands
VotingCommands

I want either in "ServerCommands -> Maps" or an extra cat. called "Maps".

In there I can select "Aim" "AWP" "Knife".

So if I press "Aim" it should list me all available "aim_maps" that I specified in an extra file. (Those maps are from workshop, filled in with single maps, not a collection)

The first problem that I got is that under the "VotingCommands" is "maps". But I want the "maps" to be "Maps".

Second and biggest problem is that I can go to "Maps" where it shows me the other menu items. But when I press on "Aim" now, the sound goes off but nothing happens.

This is what I've got so far:

Code:
"Commands"
{
	"Maps"
	{
		"Aim"
		{
			"cmd"		"sm_map"
			"admin"		"sm_map"
			"execute"	"server"
			"1"
			{
				"type"		"mapcycle"
				"path"		"/cfg/cfg/aimmaps.txt"
			}
		}	
}
W0rm
W0rm is offline
ambn
Veteran Member
Join Date: Feb 2015
Location: Fun servers
Old 08-12-2017 , 02:02   Re: Custom Admin Menu (CS:GO) -> Group Maps
Reply With Quote #2

try this?
Code:
"Commands"
{
	"VotingCommands"
	{
		"Maps"
		{
			"Aim"
			{
				"cmd"		"sm_map #1"
				"admin"		"sm_map"
				"execute"	"server"
				"1"
				{
					"title"		"Select an aim map:"
					"type"		"mapcycle"
					"path"		"cfg/cfg/aimmaps.txt"
				}
			}
		}
	}
}
__________________

Last edited by ambn; 08-12-2017 at 02:03.
ambn is offline
W0rm
Junior Member
Join Date: May 2007
Old 08-12-2017 , 09:57   Re: Custom Admin Menu (CS:GO) -> Group Maps
Reply With Quote #3

Didn't work. It just makes the sound again and nothing happens.

Maybe the path is wrong or the content of the aimmaps.txt?

The path is: csgo/csgo/cfg/cfg
(The first "cfg/" is where the server.cfg is located. The second one I created for a better overview.)

The content of the aimmaps.txt is: de_tuscan
(Just for testing the menu)
Do I need to put the whole path to the Map in there? Or do I need the workshop link?

[EDIT#1]
Code:
"Commands"
{
	"Maps"
	{
		"Aim"
		{
			"cmd"		"sm_map #1"
			"admin"		"sm_map"
			"execute"	"player"
			"1"
			{
				"title"		"Select an Aim Map:"
				"type"		"mapcycle"
				"path"		"/cfg/cfg/aimmaps.txt"
			}
		}
	}	
}
After changing "execute" to "player" and wrote a "/" in front of "cfg" it finally worked.

After the mapchange the "Map" menu is still open. How can I do it so it automatically closes after mapchange?

Last edited by W0rm; 08-15-2017 at 15:35.
W0rm is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 08-15-2017 , 15:41   Re: Custom Admin Menu (CS:GO) -> Group Maps
Reply With Quote #4

You can't create third sub-menu using SM admin menu custom.
You need ask custom plugin for this.

PHP Code:
"Commands"
{
    
"Maps"
    
{
        
"Aim"
        
{
            
"cmd"        "sm_map #1"
            "1"
            
{
                
"type"        "mapcycle"
                "path"        "cfg/cfg/aimmaps.txt"
            
}
        }    
        
"AWP"
        
{
            
"cmd"        "sm_map #1"
            "1"
            
{
                
"type"        "mapcycle"
                "path"        "cfg/cfg/AWPmaps.txt"
            
}
        }    
        
"Knife"
        
{
            
"cmd"        "sm_map #1"
            "1"
            
{
                
"type"        "mapcycle"
                "path"        "cfg/cfg/Knifemaps.txt"
            
}
        }    
    }

__________________
Do not Private Message @me
Bacardi is offline
W0rm
Junior Member
Join Date: May 2007
Old 08-15-2017 , 16:10   Re: Custom Admin Menu (CS:GO) -> Group Maps
Reply With Quote #5

Aight. I wonder why you can't make a third sub-menu.

I copied your code. It works as planned.

But I still got some "visual" bugs.

First of all: When I open "sm_admin" I see
1. Player Commands
2. Server Commands
3. Voting Commands
4. maps

I want 4. to be with a capital "M".

Second bug is the order. I set this in my "adminmenu_sorting.txt":
Code:
"Menu"
{
	"VotingCommands"
	{
		"item"		"sm_cancelvote"
		"item"		"sm_votemap"
		"item"		"sm_votekick"
		"item"		"sm_voteban"
	}

	"Maps"
	{
		"item"		"Aim"
		"item"		"AWP"
		"item"		"Knife"
	}
}
Yet it appears in this order when I open 4.:
1. Aim
2. Knife
3. awp

2.1 Bug is that it shows "3. awp" instead of "3. AWP"

And the last bug is that the menu doesn't close after choosing/changing the map. It stays open even after mapchange and joining a team.
W0rm is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 08-15-2017 , 17:39   Re: Custom Admin Menu (CS:GO) -> Group Maps
Reply With Quote #6

Remember reload admin menu plugin and admin plugin after edit admin menu custom.

"I want 4. to be with a capital "M"."
- I assume it's something about to do with translation line in plugin code... better use to it.

It's normal when admin custom menu stay open after choose.
You could try something like this
Code:
"cmd"        "sm_map #1; slot10"
or else console command what close menu
__________________
Do not Private Message @me
Bacardi is offline
W0rm
Junior Member
Join Date: May 2007
Old 08-16-2017 , 15:33   Re: Custom Admin Menu (CS:GO) -> Group Maps
Reply With Quote #7

Reloaded both plugins and even restarted the server. Still doesn't sort the way I want. Nothing changes.

So I have to change the sourcecode of the plugin that it shows my stuff with capital letters?! oO
Need help on that then... :/

I tried all "slot" commands. Doesn't work. Only "slot1" and "slot2" works but thats for choosing the map and doesn't close the menu.
W0rm is offline
Sarin
Senior Member
Join Date: Nov 2014
Location: Sydney, Australia
Old 04-23-2019 , 01:36   Re: Custom Admin Menu (CS:GO) -> Group Maps
Reply With Quote #8

Folks,
How can i get this working?
"Required players"
{
"6"
{
"cmd" "sv_maxplayers 6"
}
"8"
{
"cmd" "sv_maxplayers 8"
}
"10"
{
"cmd" "sv_maxplayers 10"
}
}
Sarin 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:38.


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