nex_scalemenu has a tiered permission system. It is disabled by default, so out of the box everyone can open and reset their own scale. When you enable it, access is resolved through four layers in order.
Action names
Every permission grant is expressed in terms of four actions:| Action | Controls |
|---|---|
openSelf | Opening the menu for yourself (/scale) |
openOther | Opening the menu for another player (/scale <id>) |
resetSelf | Resetting your own scale (/resetscale) |
resetOther | Resetting another player’s scale (/resetscale <id>) |
How resolution works
Whenpermissions.enabled = false, every check returns true — everyone has every action. When it is true, the resolver grants an action if any of these layers allows it, checked in order. The first layer to grant wins:
defaultPermissions— a baseline applied to everyone.- ACE — FiveM ACE groups.
- Identifier whitelist — exact player identifiers.
- Discord roles — live role lookup via a bot token.
Because the layers are additive,
defaultPermissions acts as a floor for everyone, and ACE, whitelist, and Discord only ever add extra actions on top.Enabling the system
openOther and resetOther for the layers below.
ACE permissions
Map an ACE object to a set of actions. A player who is ACE-allowed for that object receives those actions.server.cfg:
group.admin now has all four actions, including openOther and resetOther.
Identifier whitelist
Grant actions to specific players by any identifier prefix they carry:license, steam, discord, ip, fivem, live, or xbl. The key is the full identifier.
The whitelist is matched against every identifier the player carries, so any one of their prefixes can match.
Discord roles
Discord role permissions are resolved live by querying the Discord API with a bot token. Results are cached per player forcacheSeconds.
| Key | Default | Description |
|---|---|---|
enabled | false | Turn Discord role checks on or off |
botToken | "" | Your Discord bot token |
guildId | "" | The guild (server) ID to look players up in |
cacheSeconds | 300 | How long to cache a player’s roles (5 minutes) |
roles | {} | Map of role ID to granted actions |
Setup
- Create a Discord application and bot at discord.com/developers/applications, then copy the Bot Token.
- Enable the Server Members Intent in the bot’s settings.
- Invite the bot to your guild with at least the View Server Members permission.
-
Fill in
config.lua:
To copy IDs, enable Developer Mode in Discord. Right-click your server icon for the guild ID, and right-click a role in Server Settings → Roles for a role ID. Roles are checked top-to-bottom, and the first match wins.

