Exports

This page lists all cd_doorlock exports, along with their purpose, parameters, and usage examples. All events are located in the [cd_doorlock/integrations] folder.

Note

These exports are entirely optional and can be used as needed within your own scripts or integrations.


Client

Get All Doors

Returns a table containing all doors and their associated data.

@parameters
--- @return table doors A table of all doors and their full data sets.

--- @example
local doors = exports['cd_doorlock']:GetAllDoors()
print('Total doors:', #doors)

for index, door in pairs(doors) do
    print('Name: ', data.door_name)
    print('Location Group: ', door.location_group)
    print('Unique ID: ', door.unique_id)
end


Get Door Unique ID

Returns the unique ID of a door. The first and second arguments define which door to retrieve the unique ID from. This unique ID is required for some events and is consistent for the door.


Get Door State (Closest)

Returns the locked state of the closest door.


Get Door State (By Name)

Returns the locked state of a specific door. The first and second arguments define which door’s state you want to check. This allows you to retrieve whether a specific named door is locked or unlocked.


Get Door State (By Unique ID)

Returns the locked state of a specific door. The unique ID determines exactly which door’s state you want to check. This allows you to retrieve whether a specific door is locked or unlocked using its unique identifier.


Get Door Data (Closest)

Returns the full cached data of the closest door. This function provides all stored information for the nearest door, including its settings, permissions, and configuration data. Useful when you need complete door details for logic, debugging, or UI.


Get Door Data (By Name)

Returns the full cached data of a specific door. The first and second arguments define which door’s data you want to retrieve. This allows you to access all stored information for a specific named door, including its settings, permissions, and configuration data.


Get Door Data (By Unique ID)

Returns the full cached data of a specific door. The unique ID determines exactly which door’s data you want to retrieve. This allows you to access all stored information for a specific door, including its settings, permissions, and configuration data.


Server

Get All Doors

Returns a table containing all doors and their associated data.


Get Door Unique ID

Returns the unique ID of a door. The first and second arguments define which door to retrieve the unique ID from. This unique ID is required for some events and is consistent for the door.


Get Door State (Closest)

Returns the locked state of the closest door.


Get Door State (By Name)

Returns the locked state of a specific door. The first and second arguments define which door’s state you want to check. This allows you to retrieve whether a specific named door is locked or unlocked.


Get Door State (By Unique ID)

Returns the locked state of a specific door. The unique ID determines exactly which door’s state you want to check. This allows you to retrieve whether a specific door is locked or unlocked using its unique identifier.


Get Door Data (Closest)

Returns the full cached data of the closest door. This function provides all stored information for the nearest door, including its settings, permissions, and configuration data. Useful when you need complete door details for logic, debugging, or UI.

Get Door Data (By Name)

Returns the full cached data of a specific door. The first and second arguments define which door’s data you want to retrieve. This allows you to access all stored information for a specific named door, including its settings, permissions, and configuration data.


Get Door Data (By Unique ID)

Returns the full cached data of a specific door. The unique ID determines exactly which door’s data you want to retrieve. This allows you to access all stored information for a specific door, including its settings, permissions, and configuration data.

Last updated

Was this helpful?