> ## Documentation Index
> Fetch the complete documentation index at: https://docs.nexdevelopment.xyz/llms.txt
> Use this file to discover all available pages before exploring further.

# Commands

> One command: /ptmenu. Admin-only, checked server-side, renamable via Config.Command.

The script registers a single command.

| Default   | Description                           |
| --------- | ------------------------------------- |
| `/ptmenu` | Opens the peacetime menu. Admin-only. |

Rename it via `Config.Command` in `shared/config.lua`:

```lua theme={null}
Config.Command = 'ptmenu'
```

## Permission model

The command itself is registered unrestricted — there is no `command.ptmenu` ACE to grant. Instead, the handler runs server-side and evaluates the admin paths from [Configuration → Admin access](/nex_peacetime/configuration#admin-access): ACE permissions, the identifier whitelist, framework auto-detection, your custom hook, or the `Config.DebugAlwaysAdmin` override. Only players who pass get the menu; there is no client-side command for non-admins to abuse.

<Info>
  When `ox_lib` is available the command is registered through `lib.addCommand`, so it appears in chat suggestions with the help text "Open the peacetime menu (admin only)".
</Info>

## When access is denied

A non-admin who runs the command gets a "You do not have permission to use this." toast. At the same time the server console prints two lines:

```
[nex_peacetime]   identifiers: license:..., discord:..., fivem:...
[nex_peacetime]   not an admin via any path — grant ACE, add an identifier to Config.Admins, or set DebugAlwaysAdmin = true.
```

Copy one of the printed identifiers into `Config.Admins` (or grant the ACE) and restart the resource to give that player access. Denied attempts can also be logged to Discord — flip `Config.Discord.log.denied` to `true` in `shared/sv_config.lua`.
