Commands#
Shutters Creator registers a single in-game command. Everything else — creating, editing, deleting, teleporting — happens inside the window it opens.
Command | Where | Description |
|---|---|---|
| In game | Opens the creator. Admins only — see Claiming Admin Access. Anybody else is told they do not have permission. |
There are no console commands. To follow what the script is doing, set Config.Debug = true and read the server console and the F8 console.
Client Exports#
For knowing which shutter a player is standing at — a phone app, a radial menu, a robbery script — and for starting a lockpick from your own item.
getCurrentShutterId
Returns the id of the shutter whose interaction point the player is standing at, and that point — or nil when they are not within any point's distance.
local shutterId, point = exports['qs-shutter-creator']:getCurrentShutterId()
if shutterId then
print(('At shutter %d, within %.1f m, lockpick allowed: %s'):format(
shutterId, point.distance, tostring(point.enable_lockpick)
))
endgetCurrentShutter
Returns the full data of the shutter the player is standing at, or nil. The client copy never contains the PIN code.
local shutter = exports['qs-shutter-creator']:getCurrentShutter()
if shutter then
print(shutter.name, shutter.job or 'public', shutter.enable_pin and 'PIN' or 'no PIN')
endlockpick
Runs the whole lockpick at the nearest interaction point — checks, animation, skill check and, on success, the shutter moving — exactly as using shutter_lockpick does. Use it when another script already owns the item that should pick shutters.
It waits for the attempt to finish, then returns 'remove' when an attempt was made — passed or failed — or false when there is no lockpickable point in reach. It does not take the item itself:
-- client side, in your own item-use handler
local result = exports['qs-shutter-creator']:lockpick()
if result == 'remove' then
TriggerServerEvent('my-heist:removeLockpick') -- your own event that removes one item
endServer Exports#
How another resource drives Shutters Creator — a store that shuts at night, a heist that opens the vault shutter, a job script that locks a garage when the last mechanic goes off duty.
getShutters
Returns every shutter on the server, in the format described under The Shutter Data below. It is the live list the script works from: read it, but change shutters through setLocked or the creator — edits to the table itself are not saved.
local shutters = exports['qs-shutter-creator']:getShutters()
for _, shutter in ipairs(shutters) do
print(shutter.id, shutter.name, shutter.job or 'public')
endsetLocked
Moves a shutter for every player and saves its new state to the database, with no access check — your script decides who may. state is written to the shutter's is_closed field: true puts the shutter at its open height, false brings it down to where it was placed. Returns true, or false when the id does not exist or state is not a boolean.
exports['qs-shutter-creator']:setLocked(3, false) -- shutter 3 down, at its placed position
exports['qs-shutter-creator']:setLocked(3, true) -- shutter 3 up, at its open heightBringing down every Burger Shot shutter at three in the morning, with ox_lib's cron:
lib.cron.new('0 3 * * *', function()
for _, shutter in ipairs(exports['qs-shutter-creator']:getShutters()) do
if shutter.job == 'burgershot' then
exports['qs-shutter-creator']:setLocked(shutter.id, false)
end
end
end)Events#
The server tells every client about each change through these events. Your own client scripts can listen to them — to play an alarm when a shutter is forced, or to refresh a map of open shops.
Client event | Receives | Fired when |
|---|---|---|
| The new shutter | An admin creates a shutter. |
| The edited shutter | An admin saves changes to a shutter. |
|
| A shutter moves — by E, by lockpick or by |
| The shutter id | An admin deletes a shutter. |
-- client side, in your own resource
RegisterNetEvent('shutters:updateShutterPartial', function(data)
print(('Shutter %d moved'):format(data.id))
end)The Shutter Data#
Every export and event above hands over shutters in this shape. types.lua carries the same description as Lua annotations (Shutter, InteractPoint).
Field | Holds |
|---|---|
| The database id, the name shown in the creator, and the prop model. |
|
|
| How far, in metres, it moves to reach its open height. Positive is up. |
| A list of |
| The required item's name, or |
| The required job and the list of allowed grades; an empty list allows every grade. |
| The same for gangs. |
| Whether a PIN is asked, and its length: 4 or 6. |
| The code itself. Server only — it is stripped from everything sent to clients. |
|
|
| The stored state: |
| The identifier of the admin who created it. |



