Commands#
This section lists all available commands included in the script. Each command is designed to simplify administration, player interaction, or debugging tasks. You’ll find detailed descriptions, usage examples, and permission requirements to help you manage and customize your server efficiently.
Command | Description |
| Command to open the creation menu. |
Server Exports#
This section provides all available server exports for the script. These functions allow developers to interact with the system from the server side, manage data, trigger actions, and integrate with other resources. Each export includes a clear description and a practical example to simplify its implementation.
GetAllDoors
local doors = exports['qs-doorlock-creator']:GetAllDoors()
for _, door in pairs(doors) do
print(('Door ID: %s | Locked: %s'):format(door.id, tostring(door.locked)))
endThis export returns a table containing all registered doors. Each entry contains the exported door information, making it useful for displaying door lists, synchronizing custom interfaces, or iterating through every available door.
GetDoor
local door = exports['qs-doorlock-creator']:GetDoor(1)
if door then
print(('Door %s is locked: %s'):format(door.id, tostring(door.locked)))
endThis export retrieves a single door using its numeric ID. If the door exists, its complete exported data is returned; otherwise, the export returns `nil`.
SetDoorState
local success = exports['qs-doorlock-creator']:SetDoorState(1, true)
print(success)This export changes the state of a door by forcing it to either locked or unlocked. It returns `true` if the operation was successful or `false` if the door could not be updated.
EnsureDoors
local ids = exports['qs-doorlock-creator']:EnsureDoors({
{
coords = vector3(434.82, -981.93, 30.89),
model = `v_ilev_ph_gendoor002`,
locked = true
}
})
print(json.encode(ids))This export validates a collection of door definitions and automatically creates any missing entries. It returns an array containing the IDs of every ensured door, making it useful for dynamically registering doors created by other resources.



