Commands#
Backrooms registers four admin commands. The two windows check the permissions set in the settings panel; the two player commands are restricted by FiveM itself and also work from the server console.
Command | Permission | Description |
|---|---|---|
|
| Opens the settings panel, with the Statistics and Creator tabs. Its name is set in the panel. |
|
| Opens the entrance creator. Its name is set in the panel. |
|
| Sends a player into a run of their own. |
|
| Pulls a player out, back to where they went in. Without an id, yourself. |
<id> is the player's server id — the number next to their name in the player list. The level ids are:
Id | Level |
|---|---|
| Level 0 — The Lobby |
| Level 1 — Habitable Zone |
| Level 2 — Pipe Dreams |
| Level 3 — Electrical Station |
| Level X — The Sublevel |
Developer Tools#
With Config.Debug.enabled = true in config/config.lua, these tools are registered. They exist to build levels and test runs.
Command | Who | Description |
|---|---|---|
| Admins | The level editor. See Usage. |
| Anyone | Prints your run to the F8 console: the detected framework, inventory and target, level, sanity, stamina, battery, noise, monsters alive and hunting, your bag and your exact coordinates. |
| Anyone | Shows or hides the nodes monsters walk along. |
| Anyone | Sets your sanity. |
| Anyone | Spawns a monster 12 m ahead: |
| Anyone | Plays an omen: |
| Anyone | A blackout — 14 seconds by default, up to two minutes. |
| Anyone | Moves your run to another level, by id. |
| Anyone | Shows a test 3D label for 15 seconds, in front of you or at the given coordinates. |
| Console or admins | Every active run: its level, routing bucket, seed, survivors, containers searched and monsters alive. |
| Console or admins | Forces a director cue on everyone in that player's run: |
| Console or admins | Gives a player a Backrooms item. |
Client Exports#
For keeping your own phone, HUD or menus out of a run, and for reading the player's state.
Is the player inside?
local inside = exports['qs-backrooms']:IsInBackrooms() -- true while in a run
local level = exports['qs-backrooms']:GetLevel() -- 'lv_01' to 'lv_05', or nil
if inside then
return -- no phone down here
endSanity, stamina and battery
local sanity = exports['qs-backrooms']:GetSanity() -- 0 to 100
local stamina = exports['qs-backrooms']:GetStamina() -- 0 to 100
local battery = exports['qs-backrooms']:GetBattery() -- 0 to 100, the flashlightServer Exports#
How another resource drives the Backrooms — a cursed item, a ritual, a quest, a punishment.
SendPlayerToBackrooms
Sends a player into a run of their own. The level is optional and defaults to Level 0.
local ok = exports['qs-backrooms']:SendPlayerToBackrooms(source, 'lv_01')
-- Bring them back somewhere specific, and let them quit from the exit panel
exports['qs-backrooms']:SendPlayerToBackrooms(source, 'lv_03', {
returnCoords = vector3(-1037.2, -2737.5, 20.2),
anchorReturn = true, -- escapes land on returnCoords instead of a random spot
})Returns false when the player is not connected, is already inside, or the level id does not exist. Without returnCoords they come back where they stood. It is logged to Discord as an admin entry and counts for the qs-inventory quest.
RemovePlayerFromBackrooms
local removed = exports['qs-backrooms']:RemovePlayerFromBackrooms(source)Pulls a player out, back to where they went in. Returns false if they were not inside.
Reading a player
local inside = exports['qs-backrooms']:IsPlayerInBackrooms(source)
local level = exports['qs-backrooms']:GetPlayerLevel(source) -- 'lv_02', or nil
local stats = exports['qs-backrooms']:GetPlayerStats(source)
-- { runs, escapes, deaths, deepest, deepestLabel, bestTimeMs, totalTimeMs, itemsFound }GetActiveInstances
for id, run in pairs(exports['qs-backrooms']:GetActiveInstances()) do
print(id, run.level, run.bucket, run.memberCount)
-- run.members = { serverId, ... }, run.seed, run.startedAt
endEvery run open right now, keyed by its id.
Server Events#
Fired on the server for every run — for a job payout, an achievement, your own logs:
AddEventHandler('qs-backrooms:playerEntered', function(source, levelId, instanceId)
end)
AddEventHandler('qs-backrooms:levelChanged', function(instanceId, levelId, reason, members)
-- reason: 'descend' or 'trap'; members: the server ids in that run
end)
AddEventHandler('qs-backrooms:playerDied', function(source, levelId, cause, timeMs)
-- cause: 'entity', 'sanity', 'fall' or 'unknown'
end)
AddEventHandler('qs-backrooms:playerLeft', function(source, reason, reward, summary)
-- reason: 'escape', 'death', 'leave', 'skyfall' or 'admin'
-- reward: the cash paid on an escape
-- summary: { outcome, timeMs, depth, depthLabel, itemsFound, lootValue, reward, ... } or false
end)A disconnect does not fire playerLeft — the run is kept or closed according to the Disconnects and ranking settings. On the client, qs-backrooms:client:blockResource marks the start and end of a run — see Integrations.
About the Errors#
Server callbacks answer with a locale key rather than a sentence — notify.too_far, notify.exit_locked, general.no_permission — so the same failure reads in each player's own language. Translate them with the strings in locales/, and see Common Errors for what the usual ones mean.



