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

# HRAdminMenu

A standalone admin menu with custom UI and many helpful functions

{% hint style="info" %}
This script contains a few functions that require framework.\
To remove them from usage you can remove them from the config file.
{% endhint %}

{% hint style="warning" %}
The Ox framework support is still not finished and unstable
{% endhint %}

## Installation

* Download the dependency [HRLib](https://github.com/HRScripts/HRLib/releases/latest) - [documentation](broken://pages/Ep5kSHLO83LleEO9rVP4)
* Purchase and download the admin menu
* Configure it from the config file
* Write this in your server.cfg\
  `start HRLib`\
  `start HRAdminMenu`
* Restart your server

## Config Preview

```lua
local config = {}

config.language = 'bg'

config.warns = {
    max = 3,
    exceedingAction = {
        action = 'ban', -- 'ban' or 'kick'
        banExperience = 3, -- In days (Set this only if you set the action to 'ban')
        reason = ('You were banned for %s days for reaching maximum warns count! Experience date: %s'):format(3 --[[ your experience date ]], '%s'), -- if you understand configure this by your own way but if you don't, configure it without removing the %s in the translation (this is the experience date after reaching max warns)
    },
}

config.frameworkRequiredFuncs = { -- This table enables/disables the functions in the adminmenu that require framework (available frameworks: 'ox'|'esx'|'qb')
    setjobFramework = true,
    setmoneyFramework = true
}

config.commandsNames = {
    ['goto'] = 'goto',
    bring = 'bring',
    ban = 'ban',
    unban = 'unban',
    setStaff = 'setStaff',
    removeStaff = 'removeStaff',
    tpm = 'tpm',
    emergency = 'emergency',
    freeze = 'freeze',
    warn = 'warn',
}

config.menuSettings = {
    openMenu = {
        key = {
           enable = true,
           defaultKey = 'HOME'
        },
        command = {
            enable = true,
            cmdName = 'adminmenu',
        }
    }
}

config.groups = {  -- table of special commands access or 'all' (available commands for each group: 'goto', 'bring', 'ban', 'unban', 'setStaff', 'removeStaff', 'tpm', 'emergency', 'freeze', 'warn', 'setMoney', 'setJob', 'spawnVeh')
    {
        name = 'mod',
        commandsAllowed = { -- table of special commands access or 'all'
            'goto',
            'bring',
            'tpm'
        }
    },
    {
        name = 'admin',
        commandsAllowed = 'all'
    }
}

config.instructions = [[
    Fill this within your instructions for the menu usage
]]
```

## Video Preview

{% embed url="<https://www.youtube.com/watch?ab_channel=HRScriptsDevelopment&v=sRs9UxWGc7E>" %}
