Installation
Resource-specific setup for nx_slotmachine. Dependencies, database import, and framework selection.
For server-wide prerequisites (artifacts, oxmysql, ox_lib), follow
the generic install guide first.
This page only lists what is specific to nx_slotmachine.
Dependencies
Framework selection is manual. Set Config.Framework to
one of "ESX", "QB", or "QBOX".
The matching framework resource must start before
nx_slotmachine.
Renders the slot UI onto the cabinet screen as a 3D DUI panel.
Streamed cabinet models. Ships in the same release archive as nx_slotmachine and must start before it.
Database import
The resource creates its tables at runtime via
CREATE TABLE IF NOT EXISTS, so you can skip this step. If you prefer
to install the schema up front, import both files:
mysql -u <user> -p <database> < sql/install.sql
mysql -u <user> -p <database> < sql/analytics.sqlRun both, or neither. The resource creates whatever is missing on first use either way.
sql/install.sql
nx_slotmachine_world_slots. Persistent placements created through the/manageslotsUI, including each cabinet's currency.nx_slotmachine_trinity_memory. Per-character crew-role and last bonus god state for Los Santos Trinity.nx_slotmachine_settings. Key/value store. Currently holds one row, the currency used by the map-loaded Diamond Casino cabinets. Those props are not rows innx_slotmachine_world_slots, so they share one global setting.nx_slotmachine_owed_settlements. Winnings that could not be paid because the player left mid-round. Paid out on their next join.
sql/analytics.sql
nx_slotmachine_sessions. One row per player, per machine, per sitting, holding that sitting's totals.nx_slotmachine_notable_rounds. The recorded frame sequence for rounds that clearedConfig.Analytics.NotableMultiplier, used by the dashboard's replay.
Skip this file entirely by setting
Config.Analytics.Enabled to
false. Nothing is recorded and neither table is created.
Renaming tables
Four of the six table names can be overridden in config:
Config.SlotPlacement.TableName,
Config.TrinityMemory.TableName,
Config.Analytics.SessionTable,
and
Config.Analytics.NotableTable.
If you change any of them, update the matching CREATE in the SQL file
to match. Rename before you have data: renaming later leaves the old
table behind with your history in it.
server.cfg order
nx_slotmachine_stream must be started before nx_slotmachine. If
the stream resource starts after a player has joined, cabinet models
and textures will be invisible until the player rejoins.
ensure oxmysql
ensure ox_lib
ensure ox_target
ensure nx-3d
# ensure your framework here (es_extended, qb-core, or qbx_core)
ensure nx_slotmachine_stream
ensure nx_slotmachinePlacing slots
The four casino games attach to vanilla cabinet props
(vw_prop_casino_slot_01a through vw_prop_casino_slot_04a), which
already exist inside the Diamond Casino interior. Custom placements
elsewhere on the map are managed through the
/manageslots admin UI, not by editing a
config table.
Permission for /manageslots is controlled by
Config.SlotPlacement.Access.
By default only admin and superadmin ESX groups (or the equivalent
QBCore/QBox/Ace permissions) may open it.