NX CreativeNX CreativeDocs
Scriptsnx_slotmachine

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.

ox_lib
Required

Callbacks, notifications, and the slot manager UI.

ox_target
Required

Target zones on each slot cabinet for the sit interaction.

oxmysql
Required

Persistence for placed slot cabinets and Trinity crew-role memory.

nx-3d
Required

Renders the slot UI onto the cabinet screen as a 3D DUI panel.

nx_slotmachine_stream
Required

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 sql/install.sql:

mysql -u <user> -p <database> < sql/install.sql

The schema creates two tables:

  • nx_slotmachine_world_slots. Persistent placements created through the /manageslots UI.
  • nx_slotmachine_trinity_memory. Per-character crew-role and last bonus god state for Los Santos Trinity.

Both table names can be overridden via Config.SlotPlacement.TableName and Config.TrinityMemory.TableName. If you change them, also update sql/install.sql to match.

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_slotmachine

Placing 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.