Admin Menu Configuration (SourceMod)

From AlliedModders Wiki
Revision as of 02:56, 6 September 2015 by Kailo (talk | contribs)
Jump to: navigation, search
Language: English  • русский • 中文

SourceMod's administration menu can be configured to change the ordering of items. Items cannot be moved from one category to another, however, they can be re-ordered within categories. Items that are not explicitly sorted are displayed after the sorted items, and they are sorted by their translated phrase in the client's language.

Sorting is controlled via addons/sourcemod/configs/adminmenu_sorting.txt. Each section specifies the name of a category. The order of the sections determines the order the categories are sorted. Each section contains a list of unique item names that specify item sorting.

Note that the items are not commands. They are the unique names associated with each item on the menu. Third party plugins may add new items to the admin menu, and those items will have their own unique names, whether there is an associated command or not.

Sample Layout

This layout is designed to look similar to Mani Admin Plugin's admin menu.

"Menu"
{
    "PlayerCommands"
    {
        "item"      "sm_slay"
        "item"      "sm_kick"
        "item"      "sm_ban"
        "item"      "sm_gag"
        "item"      "sm_burn"
    }

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

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