> For the complete documentation index, see [llms.txt](https://modmen.gitbook.io/mdm-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://modmen.gitbook.io/mdm-documentation/mdm_helpmenu/installation.md).

# Installation

#### 📦 `mdm_helpmenu` Script Installation

* 📥 Downloading: After purchasing, download the script directly from [portal.cfx.re](https://portal.cfx.re).
* 🗂️ Extracting: Unzip the downloaded `.zip` archive.
* 📂 Moving Files: Copy the extracted script folder and place it in the `resources` directory on your server.
* ⚙️ Main Configuration: Open the config file and adjust it to your needs.

```
Config = {}

Config.Command = {
    enable = true,
    command = 'help',
    description = 'Opens the server keybind and command list',
}

-- hiererchy permission.
-- lower in the list, lower the permission.
Config.AdminGroups = {
    'dev',
    'best',
    'admin',
    'mod',
    'support',
}

Config.UI = {
    Title = 'Server Help',
    Subtitle = 'List of keybinds and commands available on the server',
    TabKeys = 'Keybinds',
    TabCommands = 'Commands',
    SearchPlaceholderKeys = 'Search keys...',
    SearchPlaceholderKeysDescription = 'Search descriptions...',
    SearchPlaceholderCommands = 'Search commands...',
    SearchPlaceholderCommandsDescription = 'Search descriptions...',
    SearchFilterKey = 'Key',
    SearchFilterCommand = 'Command',
    SearchFilterDescription = 'Description',
    NoResults = 'No results for the given phrase.',
    KeyColumnLabel = 'Key',
    CommandColumnLabel = 'Command',
    DescriptionColumnLabel = 'Description',
    CloseLabel = 'Close',
    TotalLabel = 'Items',
}

-- Menu color theme — change these values to reskin the entire UI.
-- Tip: start with Accent and Background for a quick new look.
-- Optional overrides: AccentMid, AccentDark (gradients on tabs and badges).
Config.Colors = {
    Background = '#0f1820',
    Panel = '#1e2a38',
    PanelInner = '#15202b',
    Accent = '#3d9fd9',
    AccentLight = '#5bb8f0',
    Text = '#b8d4e8',
    TextMuted = 'rgba(255, 255, 255, 0.55)',
}

-- Example purple theme:
-- Config.Colors = {
--     Background = '#120f1a',
--     Panel = '#2a1f38',
--     PanelInner = '#1a1428',
--     Accent = '#a855f7',
--     AccentLight = '#c084fc',
--     Text = '#e9d5ff',
--     TextMuted = 'rgba(255, 255, 255, 0.55)',
-- }

Config.Notifications = {
    Title = 'Keybind List',
    FailedToLoad = 'Failed to load menu data.',
}

Config.Notification = function(title, msg, notifyType)
    lib.notify({
        title = title,
        description = msg,
        position = 'top-right',
        type = notifyType
    })
end

Config.Keybinds = {
    {
        category = 'Vehicles',
        binds = {
            { key = 'Y', description = 'Start / stop vehicle engine' },
            { key = 'U', description = 'Lock / unlock vehicle' },
            { key = 'H', description = 'Toggle headlights' },
        },
    },
    {
        category = 'Interactions',
        binds = {
            { key = 'ALT', description = 'Interact with environment / object' },
            { key = 'F1',  description = 'Radial menu' },
            { key = 'X',   description = 'Cancel animation' },
        },
    },
    {
        category = 'Communication',
        binds = {
            { key = 'T',  description = 'Open chat' },
            { key = 'F3', description = 'Animation menu' },
        },
    },
    {
        category = 'General',
        binds = {
            { key = 'F2',  description = 'Inventory' },
            { key = 'ESC', description = 'Close open menu' },
        },
    },
}

-- permission:
--   'all' ->          visible for all players
--   'support' ->      support, mod, admin, best, dev
--   'mod' ->          mod, admin, best, dev
--   'admin' ->        admin, best, dev
--   'best' ->         best, dev
--   'dev' ->          only dev
Config.Commands = {
    {
        category = 'General',
        items = {
            { command = '/report', description = 'Reports a player to administration',        permission = 'all' },
            { command = '/help',   description = 'Opens the server keybind and command list', permission = 'all' },
        },
    },
    {
        category = 'Administration',
        items = {
            { command = '/revive',     description = 'Revives a player',            permission = 'support' },
            { command = '/heal',       description = 'Heals a player',              permission = 'support' },
            { command = '/revivearea', description = 'Revives players in the area', permission = 'mod' },
            { command = '/car',        description = 'Spawns a vehicle',            permission = 'admin' },
            { command = '/setgroup',   description = 'Changes a player rank',       permission = 'best' },
        },
    },
}

```

* 🎯 Dependencies (Target & Lib): By default, the script requires and `ox_lib` to function. Ensure you have them installed on your server.
* 📝 Server Configuration: Open your server config file (usually `server.cfg`) and add the following line: `ensure mdm_helpmenu`
* 🔄 Restart: Restart the script or your server. You can now fully enjoy your new help menu! 💻


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://modmen.gitbook.io/mdm-documentation/mdm_helpmenu/installation.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
