ed
This commit is contained in:
parent
6a6c44143c
commit
e50a457657
31 changed files with 1135 additions and 764 deletions
|
@ -0,0 +1,13 @@
|
|||
if not config.core_inventory then return end
|
||||
|
||||
tgiCore.cbFunction('tgiann-weapons-on-back:core_inventory:server:getInventory', function(source, cb)
|
||||
local src = source
|
||||
local xPlayer = tgiCore.getPlayer(src)
|
||||
if not xPlayer then return end
|
||||
local citizenid = tgiCore.getCid(xPlayer)
|
||||
local playerItems = {}
|
||||
for inv, canAdd in pairs(config.enableInv) do
|
||||
if canAdd then playerItems[inv] = exports['core_inventory']:getInventory(string.format("%s-%s", inv, citizenid)) end
|
||||
end
|
||||
cb(playerItems)
|
||||
end)
|
|
@ -0,0 +1,10 @@
|
|||
if config.framework ~= "esx" then return end
|
||||
if not config.useDefaultInventory then return end
|
||||
|
||||
-- esx is very bad, I can't access current inventory data from client
|
||||
tgiCore.cbFunction('tgiann-weapons-on-back:esx_inv:server:getInventory', function(source, cb)
|
||||
local src = source
|
||||
local xPlayer = tgiCore.getPlayer(src)
|
||||
if not xPlayer then return end
|
||||
cb(xPlayer.getInventory(), xPlayer.getLoadout())
|
||||
end)
|
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue