Update door
Export
Parameters
doorId
integer
The ID of the door to update
doorData
table
The door data to update with
doorData Format
This parameter can contain any of the fields used in AddDoor. You can provide only the fields you want to update, as the function will preserve existing values for fields not specified.
label
string
Name of the door
defaultState
integer
Default state: 1 = locked, 0 = unlocked
doors
table
Array of door objects with model and coordinates
maxDistance
number
Maximum distance for interaction
iconCoords
table
Coordinates where to show the interaction icon
allowedJobs
table
Table of jobs allowed to access, with grades
allowedGangs
table
Table of gangs allowed to access, with grades
requiredItem
string
Item required to access
requiresJobAndItem
boolean
If true, both job and item are required
requiredCode
string
Code required to access
autoClosureSeconds
integer
Seconds after which doors auto-close
parentBuilding
integer
Building ID this door belongs to
isSliding
boolean
If true, door is sliding rather than hinged
displayIcon
boolean
Whether to display interaction icon
requiresIdentifier
boolean
If true, specific identifiers are allowed
allowedIdentifiers
table
Table of identifiers allowed to access
vault
table
Vault door configuration
canBeLockpicked
boolean
If true, door can be lockpicked
alertPoliceOnLockpick
boolean
If true, police is alerted when door is lockpicked
soundsData
table
Custom sounds configuration
requiredItemRemoveOnUse
boolean
If true, the required item will be removed on use
Returns
boolean
True if the door was updated, false otherwise
Example
Last updated
Was this helpful?