Files
community_bridge/modules/doorlock/doors_creator/server.lua
T

21 lines
517 B
Lua
Raw Normal View History

2025-05-09 02:01:37 -04:00
---@diagnostic disable: duplicate-set-field
2025-05-18 23:45:37 -04:00
if GetResourceState('doors_creator') == 'missing' then return end
Doorlock = Doorlock or {}
2025-04-08 19:10:02 -04:00
---This will toggle the lock status of the door.
---@param doorID string
---@param toggle boolean
---@return boolean
Doorlock.ToggleDoorLock = function(doorID, toggle)
local state = toggle
if state then
exports["doors_creator"]:setDoorState(doorID, 1)
else
exports["doors_creator"]:setDoorState(doorID, 0)
end
return true
end
return Doorlock