Update server.lua
This commit is contained in:
1 parent
a1181c2758
commit
f2fad0cb5b
1 file changed
+4
-1
@@ -4,10 +4,13 @@ if GetResourceState('ox_doorlock') == 'missing' then return end
|
||||
Doorlock = Doorlock or {}
|
||||
|
||||
---This will toggle the lock status of the door.
|
||||
---@param doorID string
|
||||
---@param doorID string|number
|
||||
---@param toggle boolean
|
||||
---@return boolean
|
||||
Doorlock.ToggleDoorLock = function(doorID, toggle)
|
||||
if type(doorID) == 'string' then
|
||||
doorID = tonumber(doorID)
|
||||
end
|
||||
local state = toggle
|
||||
if state then
|
||||
exports.ox_doorlock:setDoorState(doorID, 1)
|
||||
|
||||
Reference in new issue
Block a user