Raised This Month: $91 Target: $400
 22% 

Menu within a menu? +Help


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
kennyist
Member
Join Date: Jan 2010
Old 11-04-2011 , 22:13   Menu within a menu? +Help
Reply With Quote #1

Is this possible, Can you have a menu then a sub-menu in the custom menu?
Like:
Code:
"Plugin controls (Top admins only)"
    {
        "Server"
        {
            "Adverts On/off"
            {
                "cmd"        "sm_advertisements_enabled #1"
                "admin"        "sm_ban"
                "execute"    "server"
                "1"
                {
                    "Type"        "onoff"
                    "Title"        "Adverts:"   
                }   
            }
        }
        "Gameplay"
        }
            "Melee mode vote"
            {
                "cmd"        "votemelee"
                "admin"        "sm_ban"
                "execute"    "server"   
            }
        }
    }
Also why doesn't a menu i put in show up?
The menu is this:

Code:
    "Bot menu"
    {
        "bot quota"
        {
            "cmd"            "tf_bot_quota #1"
            "admin"            "sm_ban"
            "1"
            {    
                "type"        "list"
                "title"        "Player value"
                "1"            "12"
                "1."        "12"
                "2"            "24"
                "2."        "24
            }
        }
        "Add bots"
        {
            "cmd"            "tf_bot_add 1# 2# 3# 4#"
            "admin"            "sm_ban"
            "1"
            {
                "type"        "list"
                "title"        "How meany"
                "1"            "1"
                "1."        "1"
                "2"            "2"
                "2."        "2"
                "3"            "3"
                "3."        "3"
                "4"            "4"
                "4."        "4"
            }
            "2"
            {
                "type"        "list"
                "title"        "Class:"
                "1"            "Demoman"
                "1."        "Demoman"
                "2"            "Engineer"
                "2."        "Engineer"
                "3"            "HeavyWeapons"
                "3."        "Heavy"
                "4"            "Medic"
                "4."        "Medic"
                "5"            "Pyro"
                "5."        "Pyro"
                "6"            "Scout"
                "6."        "Scout"
                "7"            "Soldier"
                "7."        "Soldier"
                "8"            "Sniper"
                "8."        "Sniper"
                "9"            "Spy"
                "9."        "Spy"
            }
            "3"
            {
                "tpye"        "list"
                "title"        "Team:"
                "1"            "Blue"
                "1."        "Blue"
                "2"            "Red"
                "2."        "Red"
            }
            "4"
            {
                "type"        "list"
                "Title"        "difficulty:"
                "1"            "Easy"
                "1."        "Easy"
                "2"            "Normal"
                "2."        "Normal"
                "3"            "Hard"
                "3."        "Hard"
            }
        }
        "Force class after death"
        {
            "cmd"            "tf_bot_force_class #1"
            "admin"            "sm_ban"
            "1"
            {
                "type"        "list"
                "title"        "Class:"
                "1"            "Demoman"
                "1."        "Demoman"
                "2"            "Engineer"
                "2."        "Engineer"
                "3"            "HeavyWeapons"
                "3."        "Heavy"
                "4"            "Medic"
                "4."        "Medic"
                "5"            "Pyro"
                "5."        "Pyro"
                "6"            "Scout"
                "6."        "Scout"
                "7"            "Soldier"
                "7."        "Soldier"
                "8"            "Sniper"
                "8."        "Sniper"
                "9"            "Spy"
                "9."        "Spy"
            }
        }
        "Kick all bots"
        {
            "cmd"            "tf_bot_kick all"
            "admin"            "sm_kick"
        }
        "Kick bot"
        {
            "cmd"            "tf_bot_kick #1"
            "admin"            "sm_kick"
            "1"
            {
                "type"         "player"
                "method"    "name"
                "title"        "Bot to kick:"
            }
        }
    }
}
It just will not show up, I have 7 sub-menus in the admin menu at the moment (excluding that one) Is that why?
__________________

kennyist is offline
Xp3r7
SourceMod Donor
Join Date: Jul 2006
Old 11-07-2011 , 03:16   Re: Menu within a menu? +Help
Reply With Quote #2

I asked this question a while back and the answer I got was no unless I had someone write a plugin/extension (cant remember which they said now) that would enable it.

This was a long time ago though and I think SM has had several updates since then so maybe something has changed.
__________________
Xp3r7 is offline
Send a message via MSN to Xp3r7
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 11-07-2011 , 14:08   Re: Menu within a menu? +Help
Reply With Quote #3

Can't do sub-menus.

SM adminmenu_custom.txt start build command parameter after selected category.

Example if we make new kick command in menu under PlayerCommands.
Command itself works this way
Code:
[SM] Usage: sm_kick <#userid|name> [reason]
Make in admin menu
Code:
"Commands"
{
    "PlayerCommands" // Player Commands category
    {
        "Kick" // Command title in menu
        {
            "cmd"    "sm_kick #1 @2" // command with 2 parameter
            "1"    // target
            {
                "title"        "<#userid|name>"
                "type"        "player"
            }
            "2"    // reason
            {
                "title"        "[reason]"
                "type"        "list"
                "1"            "Reason text"
            }
        }
    }
}
Can execute multiple commands same time, separated with semicolon ;
Need execute from server and add "admin" to not show public
Code:
"Commands"
{
    "New Menu"
    {
        "Respawn + cash"
        {
            "admin"        "sm_cash" // Admins who have access this command can see this in menu
            "cmd"    "sm_respawn #1; sm_cash #1 @2"
            "execute"    "server" // execute commands from server
            "1"
            {
                "title"        "Respawn"
                "type"        "player"
            }
            "2"
            {
                "title"        "Cash"
                "type"        "list"
                "1"            "16000"
            }
        }
    }
}

And lot of more things can do.
With admin groups you can limit show commands on menu and categories.
Or hide yourself, works when not add z flag to yourself.
__________________
Do not Private Message @me
Bacardi is offline
kennyist
Member
Join Date: Jan 2010
Old 11-08-2011 , 05:43   Re: Menu within a menu? +Help
Reply With Quote #4

Thanks for the repy, But i know how to do custom menu's and already have a massive one, thats why i asked about submenu's. Since ive got quiet a load of menus in it at the moment.

The problem is that the "Add bot" One does not work for some reason.

EDIT: Oh i just realized why it isnt working.
__________________

kennyist is offline
Reply


Thread Tools
Display Modes

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 05:27.


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