Commands#
MLO Creator registers one command for staff and a few helpers. Everything else happens inside the studio. There are no server console commands: the only thing the console is ever asked for is the add_ace lines from Installation.
Command | Where | Description |
|---|---|---|
| In game | Opens or closes the studio. Admins only. The name is set in Settings → Studio; an optional key can be bound there too. |
| Key binding | Switches the mouse between a docked panel and the world. Bound to |
| Key binding | The confirmation every player presses during a build. Bound to |
| Client console (F8) | Prints the world, ped, camera and tool state. Printed automatically a few seconds after every build — attach it to a support ticket. |
| Client console (F8) | Lists the parked-car spots of your YMAP maps and whether their models are loaded. |
The key bindings show up in FiveM's own Settings → Key Bindings → FiveM as "Open MLO Creator", "MLO Creator — Toggle UI cursor" and "MLO Creator - flush streaming during a build", so each player can rebind them.
Client Exports#
For your own scripts — an admin menu button, a tablet app, a job that opens a specific tool. The player still has to pass the admin check; for anyone else these exports do nothing.
Opening and closing the studio
-- open the studio on its home screen
exports['qs-mlocreator']:OpenStudio()
-- open it straight on one tool
exports['qs-mlocreator']:OpenStudio('mlo_editor')
-- close it, tearing down whatever tool is active
exports['qs-mlocreator']:CloseStudio()
-- true while the studio is open
local open = exports['qs-mlocreator']:IsStudioOpen()An unknown tool id is ignored and the studio opens on its home screen.
Tool ids
Id | Tool |
|---|---|
| Collision Cutter |
| MLO Creator |
| MLO Editor |
| YMAP Creator |
| Occlusion (only when turned on in Settings → Tools) |
| Map Manager |
Example: a toggle from your admin menu
-- client side of your admin menu
local function toggleMapping()
if exports['qs-mlocreator']:IsStudioOpen() then
exports['qs-mlocreator']:CloseStudio()
else
exports['qs-mlocreator']:OpenStudio('ymap')
end
endServer Exports#
A build moves every player and restarts resources for a few seconds. Anything that teleports players, restarts resources or saves positions should wait until it is over.
IsBuildRunning
-- true while a map build is running anywhere on the server
local busy = exports['qs-mlocreator']:IsBuildRunning()Example: hold an automatic restart
-- server side of your restart scheduler
local function safeRestart()
while exports['qs-mlocreator']:IsBuildRunning() do
Wait(1000) -- a build never takes more than about two minutes
end
ExecuteCommand('quit "Scheduled restart"')
endExample: block a teleport during a build
RegisterCommand('tp', function(source, args)
if exports['qs-mlocreator']:IsBuildRunning() then
return TriggerClientEvent('chat:addMessage', source, { args = { 'A map is being updated, try again in a moment.' } })
end
-- your teleport here
end, true)About the Events#
Every event starting with mlocreator: is internal, checked for admin rights on the server, and may change between versions. Do not trigger or hook them; use the exports above. The maps you build are ordinary resources named qs_mlo_<name>, so the usual onResourceStart / onResourceStop events tell your scripts when one appears or goes.



