Docs

X3D Slots 1024 Ways

1,024-way cascading slot, Mahjong style, 97.5% RTP. Server-authoritative spins, anti-exploit, with free spins, multipliers and big-win scenes.

Buy / Get freeConfig builder

Installation

Requires: ESX Legacy (es_extended) · oxmysql · MySQL

  1. Run install.sql on your database (creates stats / pending-round tables)
  2. Put the x3d_slots folder in resources/
  3. Paste your key from your account page (fivem.x3d-developer.com) into config/config.license.lua → X3D_LICENSE_KEY = 'X3D-XXXXX-XXXXX-XXXXX-XXXXX' (or use a convar set x3d_license_x3d_slots "..." in server.cfg)
  4. ensure x3d_slots in server.cfg, then restart the server
  5. Walk to a machine, press [E] to play

Everything in config/ and addons/ is freely editable (warranty intact) · core/ is encrypted and not editable


Game settings — config/config.slots.lua

Field What it does
Config.PayScale Main RTP knob (default RTP 97.5%) · higher = players win more · change only this one
Config.BetSteps Selectable bet amounts (server rejects values off the list)
Config.MaxWinX Max win per spin (× bet)
Config.DailyMaxLoss House loss/day over this = machines auto-close (0 = unlimited)
Config.BigWinX Win multiple that triggers onBigWin hook + bigwin log
Config.Machines Machine positions (add as many as you like, unique id)

Free spins / Buy feature

  • Config.FreeSpinBase (3 scatter = 10 spins) · Config.FreeSpinCap (retrigger cap)
  • Config.BuyFeature.enabled toggle buy button · Config.BuyFeature.costMul = price (floor(bet × costMul))

⚠ Paytable, Weights*, MultBase/Free, GoldChance are tuned for RTP 97.5% — changing them shifts RTP. Don't guess; use PayScale instead.

Celebrations Config.Celebration.tiers — big/mega/super thresholds (× bet, default 10/25/50) + count-up/coin timing

Game feel Config.Timing — spin/tease/cascade speed (no RTP impact) · set Config.Debug = true and press ` in-game for a live tuning panel


General — config/config.general.lua

Field What it does
Config.Locale Language 'th' / 'en'
Config.Debug true = live tuning panel (must be false in production)
Config.StreamDistance Machine prop spawn/despawn range
Config.InteractDistance [E] prompt range
Config.RateWindow / Config.RateMax Spin spam guard
Config.TimezoneOffset Timezone for daily reset (Thailand = 7)

Machine / prop / blip / audio — config/config.models.lua

  • Config.MachineProp — toggle + change the machine prop model
  • Config.Blip — map blip (sprite/color/scale/name · perMachine = every machine or grouped)
  • Config.Audio — in-world sounds (open / bigwin)

Colors / Theme — config/config.theme.lua

All colors are #RRGGBB codes — edit any single one. Applies to both the slot window (NUI) and the in-game [E] prompt · restart x3d_slots after editing.

[E] prompt — Config.Theme.prompt

Field Controls
key [E] color when in press range
keyIdle [E] color when out of range
label label text color (e.g. "Play Slots")
outline true/false black outline + shadow

Slot window — Config.Theme.ui

Field Controls
accent main color: buttons/active border/highlight
accentDark darker tone of the primary button
gold money/total/win labels
goldBright bright gold: active multiplier / BIG-MEGA WIN banner
surface1 surface2 surface3 panel surfaces (dark→light)
woodHi woodMid woodLo woodEdge machine wood frame
cellTop cellBot cellEdge info cells (balance/win/bet)
felt1 felt2 felt3 reel field (behind the reels)

Example jade theme: accent = '#35D4AC', accentDark = '#157F66', woodHi/Mid/Lo/Edge = '#1C6B57'/'#124036'/'#0E332B'/'#0A251F', surface1/2/3 = '#0B1513'/'#101D1A'/'#1A2B27' (felt can stay green).


Logging — config/config.log.lua

Config.Log.adapter picks the sink: none / print / discord (direct webhook) / azael / custom

  • Config.Log.events — which events to log (spin/bigwin/buyfeature/suspend/settle)
  • ⚠ spin = true logs every spin — floods Discord with many players; enable only for debugging
  • discord: set webhooks (per-event) + username/avatar/colors

Hooks — config/functions/ (wire in your own Lua)

Server config.functions.server.lua

Hook When
canPlay(e) Gate before opening (return false = block), e.g. VIP only
getMachines() Provide machine positions from your zone system (nil = use Config.Machines)
onSpinResolved(e) After a spin resolves (logs/stats)
onBigWin(e) Win over Config.BigWinX (announce/webhook)
onSettle(e) After money actually moves

Client config.functions.client.lua

Hook When
onOpenUI(e) Panel opened (hide HUD / blur / freeze / sound)
onCloseUI(e) Panel closed (restore)
drawPrompt(e) Draw the [E] prompt yourself (swap to ox_target / textUI · return true)
onMachineEnter/Exit(e) Enter/leave machine range
onSessionSummary(e) Summary on close (notify yourself · return true)

Each file ships with ready copy-paste examples in the comments


Troubleshooting

  • No machines = license not activated (check server console) or install.sql not run
  • Console shows LICENSE CHECK FAILED = wrong/expired key or bound to another IP — check your account page
  • RTP off = you changed something other than PayScale — restore defaults and tune only PayScale
  • Config change not applying = you didn't restart x3d_slots (theme/web/ changes need a restart)
View product page