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