> For the complete documentation index, see [llms.txt](https://shredded.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://shredded.gitbook.io/docs/paid-scripts/shr-bossmenu/install.md).

# INSTALL

ESX Legacy boss menu — finance, HR, duty tracking, analytics, admin panel. Boss locations are created **in-game** (database), not in config.

**Dependencies:** `es_extended`, `oxmysql`, `esx_society`, `ox_target`, `ox_lib`

***

## Install

{% stepper %}
{% step %}

## Import the SQL

Import `sql/install.sql`
{% endstep %}

{% step %}

## Add the resource order to `server.cfg`

```cfg
ensure oxmysql
ensure es_extended
ensure esx_society
ensure ox_lib
ensure ox_target
ensure shr_bossmenu
```

{% endstep %}

{% step %}

## Edit `config.lua`

At minimum, set `Config.Locale` and `Config.AdminGroups`.
{% endstep %}

{% step %}

## Create a boss menu location in-game

`/abossmenu` → **Boss Menu Locations** → **Create at My Position**
{% endstep %}

{% step %}

## Set the job and permissions

Set job, society (`society_police`), and boss grades, then save.

Boss players use **ox\_target** at the zone to open the menu.
{% endstep %}
{% endstepper %}

***

## Commands

| Command      | Who   | Description                                 |
| ------------ | ----- | ------------------------------------------- |
| `/abossmenu` | Admin | Admin panel (jobs, locations, global stats) |

Default command — change via `Config.AdminCommand`.

***

## Boss menu tabs

| Tab         | What it does                          |
| ----------- | ------------------------------------- |
| Overview    | Balance, employees, monthly stats     |
| Finance     | Deposit / withdraw, transaction log   |
| Employees   | Hire, fire, promote                   |
| Activity    | Weekly on-duty leaderboard (ISO week) |
| Statistics  | Monthly analytics + logs              |
| Permissions | Owner grade configures other grades   |

***

## Admin panel

* **All Jobs** — list every ESX job, open boss menu in admin mode
* **Boss Menu Locations** — create / delete / teleport to zones
* **Global Analytics** — cross-faction monthly stats

Admin group must match `Config.AdminGroups` (ESX `getGroup()`).

***

## Permissions

Each location defines **boss grades**. Highest grade = **owner** (can edit permissions).

Actions: `overview`, `finance`, `deposit`, `withdraw`, `employees`, `hire`, `fire`, `promote`, `activity`, `statistics`, `manage_permissions`

***

## Duty tracking

```lua
Config.Duty.Mode = 'esx'   -- ESX job.onDuty (default)
-- 'esx_service' | 'export' | 'event' | 'none'
```

Time saved in **minutes** per ISO week (`2026-W23`). See [config.md](broken://pages/7ecfaff3c0f0e39a71f3428e01f855912a8e1308).

***

## Billing / invoices

Reads paid society invoices from DB table `billing` (configurable). No billing script edit needed.

Custom billing → edit open file `server/integrations.lua` or use export `RecordSocietyDeposit`.

Details: [config.md](broken://pages/7ecfaff3c0f0e39a71f3428e01f855912a8e1308)

***

## Locales

```lua
Config.Locale = 'en'   -- or 'cs'
```

Add language: copy `locales/en.lua`, translate, add to `fxmanifest.lua`.

***

## Open files (editable)

* `config.lua`
* `locales/*.lua`
* `sql/install.sql`
* `server/integrations.lua`

***

## Common issues

| Problem            | Fix                                                                |
| ------------------ | ------------------------------------------------------------------ |
| No ox\_target zone | Create location in `/abossmenu`                                    |
| No permission      | Grade must be in location boss grades                              |
| Finance fails      | Society account must exist (`society_<job>`)                       |
| No duty data       | Set `Config.Duty.Mode = 'esx'`, be on duty                         |
| Invoices missing   | Check `Config.Integrations.Billing`, society name matches location |

Exports & full config: [exports.md](broken://pages/56841688423f26e7d4904adcb4560f8bcbe7f5fe) · [config.md](broken://pages/7ecfaff3c0f0e39a71f3428e01f855912a8e1308)
