0.0.10
Aligned folder names with table names for most parts. Temporarily removed unfinished ox_core compatibility. Added missing tables to init.lua, updated manifest to reflect new folder names, and incremented version number.
This commit is contained in:
1 parent
24431d1bf4
commit
92f6d42555
51 files changed
+225
-161
No files matched your search
@@ -0,0 +1,7 @@
|
||||
if GetResourceState('doors_creator') ~= 'started' then return end
|
||||
|
||||
Doorlock = {}
|
||||
|
||||
Doorlock.GetClosestDoor = function()
|
||||
return exports["doors_creator"]:getClosestActiveDoor()
|
||||
end
|
||||
@@ -0,0 +1,13 @@
|
||||
if GetResourceState('doors_creator') ~= 'started' then return end
|
||||
|
||||
Doorlock = {}
|
||||
|
||||
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
|
||||
@@ -0,0 +1,7 @@
|
||||
if GetResourceState('ox_doorlock') ~= 'started' then return end
|
||||
|
||||
Doorlock = {}
|
||||
|
||||
Doorlock.GetClosestDoor = function()
|
||||
return exports.ox_doorlock:getClosestDoor()
|
||||
end
|
||||
@@ -0,0 +1,13 @@
|
||||
if GetResourceState('ox_doorlock') ~= 'started' then return end
|
||||
|
||||
Doorlock = {}
|
||||
|
||||
Doorlock.ToggleDoorLock = function(doorID, toggle)
|
||||
local state = toggle
|
||||
if state then
|
||||
exports.ox_doorlock:setDoorState(doorID, 1)
|
||||
else
|
||||
exports.ox_doorlock:setDoorState(doorID, 0)
|
||||
end
|
||||
return true
|
||||
end
|
||||
@@ -0,0 +1,20 @@
|
||||
if GetResourceState('qb-doorlock') ~= 'started' then return end
|
||||
|
||||
Doorlock = {}
|
||||
|
||||
Doorlock.GetClosestDoor = function()
|
||||
local closestDoor = exports["qb-doorlock"]:GetClosestDoor()
|
||||
if Table.CheckPopulated(closestDoor) then return closestDoor end
|
||||
local allDoors = exports["qb-doorlock"]:GetDoorList()
|
||||
local pedCoords = GetEntityCoords(cache.ped)
|
||||
local door = 0
|
||||
local doorDist = 1000.0
|
||||
for doorID, data in pairs(allDoors) do
|
||||
local dist = #(pedCoords - data.objCoords)
|
||||
if dist < doorDist then
|
||||
door = doorID
|
||||
doorDist = dist
|
||||
end
|
||||
end
|
||||
return door
|
||||
end
|
||||
@@ -0,0 +1,8 @@
|
||||
if GetResourceState('qb-doorlock') ~= 'started' then return end
|
||||
|
||||
Doorlock = {}
|
||||
|
||||
Doorlock.ToggleDoorLock = function(doorID, toggle)
|
||||
TriggerClientEvent('qb-doorlock:client:setState', -1, 0, doorID, toggle, false, false, false)
|
||||
return true
|
||||
end
|
||||
@@ -0,0 +1,18 @@
|
||||
if GetResourceState('rcore_doorlock') ~= 'started' then return end
|
||||
|
||||
Doorlock = {}
|
||||
|
||||
Doorlock.GetClosestDoor = function()
|
||||
local allDoors = exports.rcore_doorlock:getLoadedDoors()
|
||||
local pedCoords = GetEntityCoords(cache.ped)
|
||||
local door = 0
|
||||
local doorDist = 1000.0
|
||||
for _, data in pairs(allDoors) do
|
||||
local dist = #(pedCoords - data.coords)
|
||||
if dist < doorDist then
|
||||
door = data.id
|
||||
doorDist = dist
|
||||
end
|
||||
end
|
||||
return door
|
||||
end
|
||||
@@ -0,0 +1,13 @@
|
||||
if GetResourceState('rcore_doorlock') ~= 'started' then return end
|
||||
|
||||
Doorlock = {}
|
||||
|
||||
Doorlock.ToggleDoorLock = function(doorID, toggle)
|
||||
local state = toggle
|
||||
if state then
|
||||
exports.rcore_doorlock:changeDoorState(doorID, 0)
|
||||
else
|
||||
exports.rcore_doorlock:changeDoorState(doorID, 1)
|
||||
end
|
||||
return true
|
||||
end
|
||||
Reference in new issue
Block a user