This commit is contained in:
MrNewb committed 2025-04-19 14:37:10 -04:00
1 parent 2fb2edff9b
commit ad80c94833
6 files changed
+18

No files matched your search

@@ -2,6 +2,8 @@ if GetResourceState('doors_creator') ~= 'started' then return end
Doorlock = Doorlock or {}
---This will get the closest door to the ped
---@return string | nil
Doorlock.GetClosestDoor = function()
return exports["doors_creator"]:getClosestActiveDoor()
end
+4
View File
@@ -2,6 +2,10 @@ if GetResourceState('ox_doorlock') ~= 'started' then return end
Doorlock = Doorlock or {}
---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
+2
View File
@@ -2,6 +2,8 @@ if GetResourceState('qb-doorlock') ~= 'started' then return end
Doorlock = Doorlock or {}
---This will get the closest door to the ped
---@return string | nil
Doorlock.GetClosestDoor = function()
local closestDoor = exports["qb-doorlock"]:GetClosestDoor()
if Table.CheckPopulated(closestDoor) then return closestDoor end
+4
View File
@@ -2,6 +2,10 @@ if GetResourceState('qb-doorlock') ~= 'started' then return end
Doorlock = Doorlock or {}
---This will toggle the lock status of the door.
---@param doorID string
---@param toggle boolean
---@return boolean
Doorlock.ToggleDoorLock = function(doorID, toggle)
TriggerClientEvent('qb-doorlock:client:setState', -1, 0, doorID, toggle, false, false, false)
return true
@@ -2,6 +2,8 @@ if GetResourceState('rcore_doorlock') ~= 'started' then return end
Doorlock = Doorlock or {}
---This will get the closest door to the ped
---@return string | nil
Doorlock.GetClosestDoor = function()
local allDoors = exports.rcore_doorlock:getLoadedDoors()
local pedCoords = GetEntityCoords(cache.ped)
@@ -2,6 +2,10 @@ if GetResourceState('rcore_doorlock') ~= 'started' then return end
Doorlock = Doorlock or {}
---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