NX CreativeNX CreativeDocs
Scriptsnx_slotmachine

Configuration

Every entry in config.lua. Defaults, types, and purpose.

All player-facing settings live in config.lua. The file is in escrow_ignore so it remains editable after install.

Locked values that drive the calibrated RTP (symbol weights, payout tables, bonus weights, max-win cap, DUI panel geometry, sync radius) live in constants.lua and are not part of this page. Editing them will skew payout shape and is not supported.

Framework

Config.Frameworkstringdefault: 'ESX'

Active framework. One of 'ESX', 'QB', or 'QBOX'. Must match the framework resource you start before nx_slotmachine.

Debug

Config.Debugbooleandefault: false

When true, prints verbose lifecycle, spin, and UI traces to the server console and F8 client console. Leave false in production.

Economy

Config.Currencystringdefault: '$'

Legacy single-currency symbol. Used as a fallback when a slot has no currency assigned, or for stripped-down setups. The Config.Currencies table below supersedes it for per-machine customization.

Config.BetAmountsnumber[]default: { 10, 50, 100, 500 }

Available bet steps. The player cycles through these in the bet selector.

Config.DefaultBetIndexnumberdefault: 1

1-based index into Config.BetAmounts that is selected on first sit.

Currencies

Each slot cabinet runs on one currency. Admins assign it per cabinet through the /manageslots menu, and one global option covers the in-world Diamond Casino cabinets. Define every selectable currency in Config.Currencies.

Config.Currenciestable[]default: { { key = 'money', label = 'Cash', symbol = '$', type = 'item', item = 'money' }, { key = 'chips', label = 'Casino Chips', symbol = '◆', type = 'item', item = 'casino_chip' } }

List of currency options a slot can use. Each entry is charged on a bet and paid out on a win. See the field reference below.

Each entry takes:

  • key. Unique internal id stored in the database. Do not rename in place.
  • label. Display label shown in the /manageslots menu.
  • symbol. Short symbol drawn in the cabinet UI, for example "$", "◆", or "C".
  • type. Either "account" (framework money account) or "item" (ox_inventory item).
  • account. Required when type is "account". The framework account to charge and pay. ESX: "money", "bank", or "black_money". QB/QBox: "cash", "bank", or "crypto".
  • item. Required when type is "item". The ox_inventory item used as one chip.

The first entry is the default for newly placed slots and for the in-world casino cabinets until an admin overrides them in-game.

Config.DefaultCurrencystringdefault: nil

Optional currency key that sets which Config.Currencies entry new slots are created with. When nil, the first entry is used. Lets you reorder the menu without changing the default.

Presentation

Config.Splash.Enabledbooleandefault: true

Plays the NX Creative branded splash the first time a player sits at a machine in a session.

Config.Sounds.Enabledbooleandefault: true

UI sound effects for button clicks and reel events.

Slot placement

The placement system powers the /manageslots admin command. It controls who is allowed to open the manager, and optionally lets specific jobs purchase and place slot cabinets.

Config.SlotPlacement.TableNamestringdefault: 'nx_slotmachine_world_slots'

Database table that stores placed slot cabinets. If you change this, update sql/install.sql to match.

Config.SlotPlacement.Commandstringdefault: 'manageslots'

Chat command that opens the placement manager. Renaming this updates the registered command name.

Access

Config.SlotPlacement.Access.Adminstabledefault: { Enabled=true, ESXGroups={'admin','superadmin'}, QBPermissions={'admin'}, QBoxPermissions={'admin'}, QBoxGroups={'admin'}, AcePermissions={'command.manageslots','nx_slotmachine.manageslots'} }

Who counts as an admin for slot placement. Any one matching group, permission, or ACE check grants access.

Config.SlotPlacement.Access.Jobstabledefault: { Enabled=false, DefaultPrice=0, Allowed={} }

Optional job-based access. When Enabled, listed jobs may place machines for a price. Each entry in Allowed is keyed by job name and takes the shape { minGrade = number, price = number }.

Database

Config.TrinityMemory.TableNamestringdefault: 'nx_slotmachine_trinity_memory'

Database table that persists each player's Trinity Heist crew-role state across reconnects. If you change this, update sql/install.sql to match.