
Documentation
Integrate the script with your server and connect it to your existing systems using the available developer API and events.
local machines = exports['qs-guitarpro']:GetMachines()Returns
tableReturns the server best and the top scores for one chart.
local records = exports['qs-guitarpro']:GetRecords(songId, difficulty)Parameters
Parameter | Type | Description |
|---|---|---|
| string | Song id |
| string |
|
Returns
table
Returns the top players overall.
local top = exports['qs-guitarpro']:GetGlobalTop()Returns
tableFor resources that spawn their own cabinets — instanced arcades, events, player housing.
A managed machine is created by your resource, is free to play, and is only visible to the players you list. It is never written to the database and disappears with the resource that made it.
local result = exports['qs-guitarpro']:CreateManagedMachine({
id = 'event_stage_1', -- your key, max 32 chars, unique to your resource
coords = vec3(0.0, 0.0, 70.0),
heading = 180.0,
label = 'Event Cabinet',
players = 2,
})Parameters
Field | Type | Description |
|---|---|---|
| string | Your key — max 32 chars, unique to your resource |
| vector3 | Where the cabinet spawns |
| number | Facing |
| string | Name shown on the machine |
| number | 1 or 2 pads. Two pads enable Duo and Versus |
Returns
{ ok = true, id = 'event_stage_1' }Sets which managed machines a player can see.
exports['qs-guitarpro']:SetManagedVisible(source, { 'event_stage_1' })Parameters
Parameter | Type | Description |
|---|---|---|
| number | Player server ID |
| table | The complete list for that player |
This is the whole list. Anything you leave out is removed from their game immediately — it is not an "add one" call.
local machines = exports['qs-guitarpro']:GetManagedMachines()exports['qs-guitarpro']:RemoveManagedMachine('event_stage_1')Removing a machine kicks whoever is playing on it first.
A managed machine can only be edited or removed by the resource that created it. Another resource cannot touch yours, and yours cannot touch theirs.
The bridge lives in custom/esx/, custom/qb/ and custom/standalone/. Duplicate the closest one and implement the same functions:
Function | Purpose |
|---|---|
Identifier | Resolve the player's identifier |
Money in / out | Charge for a run |
Player name | Used by the leaderboard |
Only money is actually used — the machines charge to play, and nothing else touches your economy. XP, points and guitar unlocks are stored by the resource itself.
client/custom/main.lua exposes three functions to plug in your own systems:
Function | Purpose |
|---|---|
| Your notification resource |
| The floating |
| Sound cues |
qs-interface and qs-textui are picked up automatically, with an ox_lib fallback.
client/custom/target.lua holds the ox_target registration. Swap it for qb-target or any other targeting resource here.
server/custom/ holds the server-side hooks — the right place for payout logging, an external ledger, or anything that should react to a finished run.
Command | Who | What it does |
|---|---|---|
| ACE | Place and manage machines |
| ACE | Import and manage songs |
| ACE | Adjust a player's level, XP or points |
|
| In-game editors |
One ACE covers all three admin commands. The creator command and its permission are configurable in Config.Creator, the music manager in Config.Music.
local result = exports['qs-guitarpro']:CreateManagedMachine({
id = 'summer_fest',
coords = vec3(-1652.1, -1060.3, 13.15),
heading = 145.0,
label = 'Summer Festival Stage',
players = 2,
})
if result.ok then
exports['qs-guitarpro']:SetManagedVisible(source, { 'summer_fest' })
endGive every player entering the instance the same visible list:
for _, playerId in ipairs(instancePlayers) do
exports['qs-guitarpro']:SetManagedVisible(playerId, { 'instance_cabinet' })
endAnd hide it again when they leave — pass an empty list, since the call replaces the whole list:
exports['qs-guitarpro']:SetManagedVisible(playerId, {})exports['qs-guitarpro']:RemoveManagedMachine('summer_fest')local top = exports['qs-guitarpro']:GetGlobalTop()
for i, entry in ipairs(top) do
print(i, entry.name, entry.score)
endlocal records = exports['qs-guitarpro']:GetRecords('My-Song', 'hard')