How Integrations Work#
Dance Machine looks at which resources are already running when it starts and adapts to them. Everything that touches your framework — money, names, identifiers — goes through one small, unencrypted bridge file, and everything else falls back to a built-in alternative when its resource is missing.
Layer | Supported | Without it |
|---|---|---|
Framework |
| Standalone: every game is free, scores are kept by FiveM license and players appear under their FiveM name. |
Interaction |
| A proximity prompt over the machine, opened with |
3D prompt |
| Plain text drawn over the machine. |
Notifications |
|
|
HUD |
| The game's own HUD and minimap are always hidden at the machine; a third-party HUD stays on screen until you add it (below). |
Weather & time sync |
| Nothing to pause. With an unlisted sync running, the dancer's sky may flicker while the two fight over the clock. |
Arcades |
| Machines are placed only with the creator. |
Database |
| Required. |
Detection only sees resources that are already started. Anything you want picked up must be above
ensure qs-dancemachineinserver.cfg, and the console lineStarted - framework: …tells you which framework was found.
Frameworks#
The framework decides three things: who a player is, what they are called on the leaderboards, and where the price of a game is taken from.
Framework | Player identified by | Name shown | Price paid from |
|---|---|---|---|
ESX | The character identifier | The character's name | Cash, or the |
QBCore · Qbox | The citizen id | First and last name |
|
Standalone | FiveM license | FiveM name | Nothing — games are free |
Because ESX and QBCore identify the character, each character on a multicharacter server has its own records and history. Detection is written in config/main.lua, and you can pin it by hand:
-- Auto, the default: the first framework found running wins.
Config.Framework = DependencyCheck({
['es_extended'] = 'esx',
['qb-core'] = 'qb',
['qbx_core'] = 'qb',
}) or 'standalone'
-- Manual: skip detection entirely.
Config.Framework = 'esx' -- 'esx' · 'qb' · 'standalone'Adding your own framework#
Each framework is one folder in custom/ with a client.lua and a server.lua, and the script loads the one named by Config.Framework. Nothing else refers to your framework by name.
Copy the closest bridge
Copy
custom/esx/(orcustom/qb/) tocustom/myframework/.Fill in the functions
Replace the calls inside with your framework's own:
lua -- custom/myframework/server.lua local framework = {} function framework:getIdentifier(source) ... end -- the key every score is saved under function framework:getName(source) ... end -- the name on the leaderboards function framework:getMoney(source, method) ... end -- method is 'money' or 'bank' function framework:removeMoney(source, amount, method) ... end function framework:addMoney(source, amount, method) ... end return frameworkThe client file returns
getPlayerData()andgetIdentifier().Point the config at it
Set
Config.Framework = 'myframework', or add your resource to theDependencyChecklist so it is detected, and restart.
Target or Proximity Prompt#
Target is not detected on its own — it is a choice in config/main.lua:
Config.UseTarget = false, the default. Within Config.InteractDistance (2.2 m) the machine shows [E] - Pump It Up, and Config.Keys.interact (control 38, E) opens it. With qs-textui running the prompt uses its style. The wording is the menu.title line of your locale file.
Config.UseTarget = true adds an option to every cabinet of the Config.MachineModel model, reachable from Config.InteractDistance. ox_target must be running. The option opens the machine nearest to the cabinet you targeted. The code is in client/custom/target.lua, so another target resource can be wired in the same way.
Notifications and the HUD#
Both live in client/custom/main.lua, which is open for editing.
Notification(msg, type) shows every message the script sends — info, success or error. It uses qs-interface when it is running and ox_lib otherwise; point it at any other notification resource by changing that one function.
While a player is at the machine, the game's HUD and minimap are hidden every frame, and SetCustomHud(visible) is called once on the way in and once on the way out. It hides the qs-interface HUD out of the box — add your HUD's own hide/show export there:
function SetCustomHud(visible)
if GetResourceState('qs-interface') == 'started' then
exports['qs-interface']:ToggleHud(visible)
end
-- if GetResourceState('my_hud') == 'started' then
-- exports['my_hud']:SetVisible(visible)
-- end
endWeather and Time Sync#
With Config.DanceStage.forceNight on, the dancing player's own screen is set to daytime in the menu and night while the song plays. A weather-sync resource would keep pulling the clock back, so these are paused for that player alone and resumed when they leave:
Renewed-Weathersyncqb-weathersyncvSyncav_weathercd_easytime
For another sync resource, add its pause and resume events to applyDanceTime in client/custom/main.lua — or set forceNight = false to leave the clock alone. The server's time is never changed.
Arcade Creator#
With Arcade Creator (qs-arcades) on the server, the Dance Machine is one of the cabinets an arcade owner can buy and place in their arcade. Those cabinets work differently from the ones you place with /dancecreator:
Aspect | Placed with /dancecreator | Placed by an arcade |
|---|---|---|
Saved | In | Never. Arcade Creator recreates them on every start. |
Edited from | The creator's Machines tab | Arcade Creator only — they do not appear in the creator's list. |
Price | The machine's own price | Free here; the arcade charges for entry if it wants to. |
Seen by | Everyone | Only the players inside that arcade. |
Modes | As set on the machine | Two pads, every mode. |
Arcade Creator runs one shared interior for every arcade, so two arcades can have a cabinet on the same spot; each player only sees, and can only join, the one in the arcade they are in. Songs, scores and leaderboards are shared with every other machine on the server. Restarting qs-dancemachine is safe: Arcade Creator notices and puts its cabinets back a few seconds later.
Languages#
Forty-one translations ship in locales/ and cover the song menu, the game, the results, the admin panel and every notification. Set the code in config/main.lua:
-- ar, bg, bn, ca, cs, da, de, el, en, es, et, fa, fi, fr, he, hi, hr, hu, id, it,
-- ja, ko, lt, lv, ms, nl, no, pl, pt, ro, ru, sk, sl, sv, sw, th, tr, uk, ur, vi, zh
Config.Locale = 'en'To add a language, copy en.json to the new code, translate it and set Config.Locale to that code. A line left out of a translation falls back to English and is named in the console as a Missing locale key, so nothing ever shows up blank.



