Dance minigame
The GTA Online nightclub dance minigame, rebuilt for FiveM and playable anywhere on your map. Tap on the beat to climb four intensity levels, hold to keep them, boost or drop on demand, cycle ten styles and cut into 27 special moves without leaving the floor. Everyone around sees the whole thing, and your server never runs a line of it.
What it does
A beat match on four levels, on the Rockstar numbers
Tap on the beat and the intensity climbs. Eight clean beats cross a level, sixteen missed ones drop you back, eight wrong inputs cost you a level straight away. The meter does not jump between values, it converges toward the real signal at its own gain and decay rates, which is what makes the climb feel earned rather than switched on.
Technical
specifications
Everything you
get
-
Fifteen locale files, shipped filled
Your players read the script in their own language from the first start, and the files sit outside escrow so you can edit any line in production. Honest note: they are translated and reviewed by us, not proofread by native speakers of all fifteen. Tell us what reads wrong in yours and it gets fixed.
-
Every gameplay number is open
Beats to climb a level, beats to fall, gain and decay rates, camera shake amplitude, rotation speed, hold time for an upper-body move, immunity windows after a boost. `config/config.lua` is escrow exempt, so a club owner can make the minigame forgiving or brutal without asking us.
-
Twelve controls, and a pad that works out of the box
Each entry is a FiveM input rather than a key, so the defaults already work on a controller: the tap sits on the right trigger, the hold on the left, exactly like GTA Online. On mouse and keyboard the same session runs on the mouse buttons, space and F. Every one is a control id in the config, so a server with its own layout swaps the whole block at once.
-
Four client exports, including a beat you can drive
Start and stop a dance from your own script, ask whether the player is dancing, and hand the resource the BPM of the track your own music system is playing. That last one is what makes the minigame work with custom music instead of only with the emitters Rockstar placed.
Integration guide
Installation
-
Drop the resource
Grab the script from your Tebex account, copy the
avenida_dance/folder into your resources directory, and addensure avenida_danceto your server config. Nothing has to start before it. -
Pick your trigger
Open
config/config.lua.Config.Commandis the chat command,Config.Keybindregisters a rebindable key withConfig.DefaultKeyas its default. Keep both, or set the command tofalseand leave players the key. -
Set the language
Config.Localetakes any of the fifteen codes shipped inlocales/. The files are escrow exempt, so you can rewrite any line to match the tone of your server. -
Point the notifications at your stack
Config.Notifis onautoand detects ox_lib, okokNotify, QBCore or ESX in that order. Force a target if you run several, or use thecustombranch ofbridges/notif.luafor your own system. -
There is no step five
No SQL to run, no framework to declare, no permission to grant. Restart and type the command.
Quickstart
How players start dancing
A command, a key, or both. The key registers in the FiveM settings under Key Bindings, so each player can rebind it without touching your config.
-- config/config.lua
Config.Command = 'dance' -- chat command, false to disable
Config.Keybind = true -- rebindable key in FiveM settings
Config.DefaultKey = 'F7'
-- The GTA:O help panel with styles, actions and controls.
-- Off, style and move changes are announced by notification instead.
Config.ShowHints = trueAPI Reference
Public exports grouped by domain. Each row shows the call signature and what it does, not how it does it.
Session
StartDance
exports.avenida_dance:StartDance(styleIndex?) --> booleanStarts a session for the local player, optionally forcing a style index from 1 to 10. Returns
falsewhen the player cannot dance right now, in a vehicle, in water, in the air or already dancing, so your own script can decide what to do about it.StopDance
exports.avenida_dance:StopDance()Ends the current session and plays the real outro rather than cutting the animation. Safe to call when nobody is dancing.
IsDancing
exports.avenida_dance:IsDancing() --> booleanTrue while the local player is in a session. Useful to block your own interactions, your inventory or a job action while the minigame owns the controls.
Music
SetDanceBeat
exports.avenida_dance:SetDanceBeat(bpm, msToNextBeat?)Feeds the simulated beat with the tempo of the track your own music resource is playing. The second argument aligns the phase, so the beat icon pulses on the actual downbeat instead of somewhere near it. Ignored when the value is not a positive number.
Recipes
Real-world copy-paste examples. Drop them into your own resource, tweak the values, ship.
The native beat only exists where Rockstar put an audio emitter. If your club streams its own tracks, turn the native beat off and push the tempo yourself. Call it once when a track starts, then again whenever the track changes.
-- config/config.lua
Config.UseNativeBeat = false
Config.FallbackBpm = 122.0
-- in your music resource, when a track starts
exports.avenida_dance:SetDanceBeat(128.0, 180)A stage, a podium, a pole, a stripper job: give the player the dance without a command. Force a style index so the podium always gets the same look, and read the return value so you know whether it actually started.
local started = exports.avenida_dance:StartDance(7) -- shuffle
if not started then
-- the player is in a vehicle, in water, or already dancing
return
endA controller needs nothing here, the defaults are FiveM inputs and the game already maps them to the pad. This is for a server that wants its own keys. Keep the tap and the hold on two different inputs, the minigame reads them independently.
-- config/config.lua
Config.Controls = {
beat = 201, -- INPUT_FRONTEND_ACCEPT
hold = 202, -- INPUT_FRONTEND_CANCEL
boost = 22, -- INPUT_JUMP
drop = 23, -- INPUT_ENTER
flourish = 45, -- INPUT_RELOAD
stop = 73,
-- the rest keeps its default
}The difficulty is four numbers. Lower `BeatsHit` and a casual crowd reaches level four; raise `BeatsFail` and mashing stops being punished. These are the values a club owner will want to touch first.
-- config/config.lua
Config.BeatsHit = 8 -- clean beats to cross a level
Config.BeatsMiss = 16 -- missed beats to drop one
Config.BeatsFail = 8 -- bad inputs to drop one
Config.Level3Min = 0.25
Config.Level4Min = 0.75Troubleshooting
- No, and not as a fallback either: there is nothing in this resource that a framework could provide. It never reads money, items, jobs or identity. That is why the same file runs on ESX, QBCore, Qbox, vRP, ox_core or a bare server without a single bridge to configure. The only thing a framework can do here is display a notification, which is one open file.
- No. `Config.UseOxLib` ships off, and with it off the resource calls native FiveM APIs for everything: the ped, the vehicle check, the player id. Turn it on and it uses the ox_lib caches instead, which is worth having on a server already running the ox stack. The only other place it appears is one branch of the notification bridge, among six.
- Neither. There is no server file in the resource, no SQL, no table, no event coming back from a client. Everything a nearby player sees comes from four statebags pushed by the dancer. That is a design choice with a consequence worth saying out loud: nothing is persisted server side, so a player style preference lives in their own game settings, not in your database.
- The animation network GTA uses for this minigame does not clone over OneSync, so remote dancers are re-simulated locally from the statebags. Most of the time that reproduces the real thing. When a clone gets stuck in its intro state, the resource retries twice, then loops the dominant clip of the 27-clip grid instead. Style, intensity and direction stay correct, the blend between poses is simply less rich. Full-body special moves always replicate natively.
- Yes, through `SetDanceBeat`. The native beat is read from Rockstar audio emitters, which only exist where Rockstar put them. For a custom track, turn `Config.UseNativeBeat` off and hand the resource your BPM plus the delay to the next beat. The beat icon then pulses on your track, not on a guess.
- Past `Config.MaxBpm`, 140 by default, the dance animations start drifting out of sync with the music. Rather than let that show, the animation rate is reduced by a quarter above that threshold and playback stays clamped between 0.8 and 1.2 times normal speed. Both numbers are in the open config if you want to push them.
- Anywhere on foot, on solid ground. There is no zone to declare and no location list to maintain. The session stops by itself if the player enters water, goes into the air, catches fire or ragdolls, so nobody ends up dancing in mid-air off a rooftop.
- 0.00ms. The resource has no ambient loop at all: it registers a command, a key binding and a statebag handler, and then does nothing until someone starts a session. Every thread a session creates dies when the session ends.
FEATURED DerassYoga minigame
The yoga minigame from story mode, pulled out of the mission and turned into a roleplay activity anyone can start. Line up both markers, hold the pose while the body moves into it, then breathe in and breathe out on the triggers. Three routines, fourteen poses, the real animations and the real breathing sounds. And a score your own scripts can react to.
FEATURED Avenida TeamBarber shop
A barbershop staged like a scene, with a camera the player actually controls. The character walks in, sits down, and the barber gets to work while an orbit camera frames the head. Hair, beard, overlays and the full skin-detail set, previewed live before a single dollar is spent.
FEATURED Avenida TeamClothing store
A clothing store with saved outfits, company wardrobes and an editor that prices the catalogue from inside the game. Every component and every prop, bought one garment at a time or as a whole look, with a server-side ledger that stops anyone wearing what they never paid for.