> For the complete documentation index, see [llms.txt](https://project-07.gitbook.io/project_07-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://project-07.gitbook.io/project_07-docs/scripts/project07-radialmenu-v2/installation.md).

# Installation

## ⚙️ Installation

1. Copy the resource folder into your server's resources directory, e.g.:

   ```
   resources/[local]/Project07_RadialMenu
   ```
2. Add it to your `server.cfg`:

   ```
   ensure Project07_RadialMenu
   ```
3. Restart the resource (or your server). No other resource needs to be started before it — it has no dependencies.
4. *(Optional)* Open `config/config.lua` and `config/items.lua` to adjust the keybind and the actual menu items to match your server's job/script names.

That's it — press the configured keybind (`Z` by default) in-game to open it.

> **Note:** Keep the resource's folder name as `Project07_RadialMenu`. Some internal checks and all of the exports in EXPORTS.md assume that exact name

***

### 🛡️ Admin Tablet

Server admins get a separate full-screen GUI for managing the menu without touching config files — open it with `/radialadmin` (configurable in `config/admin.lua`).

**Requires an ACE permission** (`project07.admin` by default). Grant it in `server.cfg`:

```
add_ace group.admin project07.admin allow
add_principal identifier.license:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx group.admin
```

***

## 🛠️ Configuration files

| File                   | Purpose                                                                    |
| ---------------------- | -------------------------------------------------------------------------- |
| `config/config.lua`    | Keybind, movement lock, trunk classes, general toggles                     |
| `config/framework.lua` | ESX job→type mapping, notify defaults, ox\_lib-bridge notes                |
| `config/items.lua`     | The actual radial menu tree — every category, submenu, and job item        |
| `config/theme.json`    | Server-side *default* theme (colors, sizes, animation speed, shape)        |
| `shared/locale.lua`    | Loads `locales/<lang>.json` and exposes `locale(key, ...)` everywhere      |
| `locales/en.json`      | Every user-facing string, including each menu item's label under `items.*` |

**Adding your own menu items** — edit `config/items.lua`. Each item supports:

```lua
{
    id       = 'unique_id',        -- required
    icon     = 'car-side',         -- FontAwesome 6 solid icon name (no "fa-" prefix)
    label    = locale('items.my_item'),
    event    = 'my:client:event',  -- OR serverEvent, OR command, OR onSelect — pick one
    args     = {},                 -- optional, passed through to whichever you used
    keepOpen = false,              -- true = menu stays open after this fires
    menu     = 'submenu_id',       -- OR set this instead of event/etc to open a submenu
}
```

Add the matching label to `locales/en.json` under `"items": { "unique_id": "My Item" }`.

**Adding a new language** — copy `locales/en.json` to `locales/xx.json` and translate the strings, then change `LOCALE_LANG` at the top of `shared/locale.lua` to `'xx'`.

### 📦 Exports

Full reference for every export this resource provides — for other scripts to add/remove their own radial items directly — is in **EXPORTS.md**, including signatures, parameter types, and copy-pasteable examples.
