> For the complete documentation index, see [llms.txt](https://alpy-scripts-1.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://alpy-scripts-1.gitbook.io/docs/resources/alpy-boss-menu.md).

# Alpy Boss Menu

Alpy Boss Menu is a fully-featured, production-ready organization management resource for FiveM, compatible with both ESX and QBCore frameworks out of the box.The menu provides bosses and authorized ranks with a clean, modern interface to manage every aspect of their organization — from hiring and firing employees to controlling finances and configuring rank permissions.

***

### Features

Employee Management

* View all employees with their current rank and online status
* Hire players by searching online players by name
* Hire the nearest player with a single click using the Hire Nearest button
* Fire employees with a confirmation prompt
* Promote or demote employees to any rank
* Self-management is blocked — you cannot edit or fire yourself

Grade / Rank Management

* Create, edit, and delete organization ranks
* Configure salary per rank
* Assign per-grade permissions individually
* The boss grade always retains full permissions and cannot be deleted
* Lower-ranked staff cannot edit or delete ranks equal to or above their own

Organization Safe

* Deposit and withdraw funds from a shared organization safe
* Full transaction history with author, date, amount, and note
* Weekly net balance summary
* Safe page is visually locked for ranks without safe access

Permission System

* Fully database-backed per-grade permissions stored in bossmenu\_permissions
* Five configurable permissions per grade: Open Menu, Hire, Fire, Manage Safe, Manage Grades
* Boss grade always has all permissions forced on
* Config.BossOnlyMenu toggle to restrict the menu to the boss only if desired

Notifications

* All notifications are routed through ox\_lib for native in-game toasts
* Specific, descriptive error messages for every failure case (insufficient funds, no permission, player not found, etc.)

Optional Hire Request System

* Optional integration with okokRequests for sending hire requests that the target player must accept or decline
* Disabled by default (Config.HireRequestSystem = false)

UI / UX

* Smooth open and close animations
* Styled custom scrollbars
* Fully responsive modal system with keyboard (Escape) support
* Browser-previewable with built-in demo data — no server required to inspect the UI

***

### Dependencies

| Dependency    | Required             |
| ------------- | -------------------- |
| oxmysql       | Yes                  |
| ox\_lib       | Yes                  |
| ox\_target    | Yes (optional zones) |
| ESX or QBCore | Yes (one of the two) |
| okokRequests  | No (optional)        |

***

### Installation

1. Place the AlpyBossMenu folder into your server's resources directory.
2. Run the SQL from INSTALLME.sql on your database — or let the resource auto-create the tables on first start.
3. Add ensure AlpyBossMenu to your server.cfg.
4. Configure config.lua to match your server setup.

***

### Configuration

All options are found in config.lua. Key settings:

* Config.Job — the job name this menu applies to
* Config.BossOnlyMenu — set to true to restrict the menu to the boss grade only; set to false to use per-grade database permissions
* Config.HireRequestSystem — enable okokRequests integration for hire confirmations
* Config.HireRequestTimeout — seconds before a hire request expires
* Config.Debug — enable verbose server logging for troubleshooting
* Config.Locations — define ox\_target interaction zones where the menu can be opened

***

### Database Tables

The resource automatically creates all required tables on first start:

| Table                  | Purpose                                             |
| ---------------------- | --------------------------------------------------- |
| bossmenu\_safe         | Stores the organization safe balance                |
| bossmenu\_transactions | Full transaction history                            |
| bossmenu\_grades       | Grade definitions (name, label, salary, rank level) |
| bossmenu\_permissions  | Per-grade permission flags                          |

### Exports

The following exports are available for use in other resources.

***

#### Client-Side

Open the boss menu manually

`exports['AlpyBossMenu']:OpenBossMenu()Opens the boss menu for the local player, performing all permission checks before showing the UI.`

***

Close the boss menu manuallyexports\['AlpyBossMenu']:CloseBossMenu()Closes the boss menu if it is currently open.

***

#### Server-Side

Get the safe balance for a `joblocal balance = exports['AlpyBossMenu']:GetSafeBalance(jobName)Returns the current safe balance (number) for the given job name.`

| Parameter | Type   | Description           |
| --------- | ------ | --------------------- |
| jobName   | string | The job name to query |

***

Add money to a job safeexports

`['AlpyBossMenu']:AddSafeMoney(jobName, amount)Adds the specified amount to the job's safe balance.`

| Parameter | Type   | Description                      |
| --------- | ------ | -------------------------------- |
| jobName   | string | The target job                   |
| amount    | number | Amount to add (must be positive) |

***

Remove money from a job safeexports\['AlpyBossMenu']:RemoveSafeMoney(jobName, amount)Removes the specified amount from the job's safe balance.

| Parameter | Type   | Description                         |
| --------- | ------ | ----------------------------------- |
| jobName   | string | The target job                      |
| amount    | number | Amount to remove (must be positive) |

<br>
