mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-08-29 17:28:53 +00:00
Implemented json encoded inventory, closes #177
This commit is contained in:
@@ -129,8 +129,20 @@ function CreateExtendedPlayer(player, accounts, inventory, job, loadout, name, c
|
||||
end
|
||||
end
|
||||
|
||||
self.getInventory = function()
|
||||
return self.inventory
|
||||
self.getInventory = function(minimal)
|
||||
if minimal then
|
||||
local items = {}
|
||||
|
||||
for k,v in ipairs(self.inventory) do
|
||||
if v.count > 0 then
|
||||
items[v.name] = v.count
|
||||
end
|
||||
end
|
||||
|
||||
return items
|
||||
else
|
||||
return self.inventory
|
||||
end
|
||||
end
|
||||
|
||||
self.getJob = function()
|
||||
|
||||
Reference in New Issue
Block a user