Skip to content

Commit

Permalink
new shared function
Browse files Browse the repository at this point in the history
  • Loading branch information
Ktos93 committed Nov 27, 2020
1 parent 69b9610 commit 3efbef0
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions server/sv_main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -742,6 +742,17 @@ local output = {}
return output
end

function SharedInventoryFunctions.removePlayerInventory(_source)
TriggerEvent('redemrp:getPlayerFromId', _source, function(user)
local identifier = user.getIdentifier()
local charid = user.getSessionVar("charid")
local money = user.getMoney()
Inventory[identifier .. "_" .. charid] = {}
InventoryWeight[identifier .. "_" .. charid] = 0.0
TriggerClientEvent("redemrp_inventory:SendItems", _source, PrepareToOutput(Inventory[identifier .. "_" .. charid]) , {}, money , InventoryWeight[identifier .. "_" .. charid])
end)
end

function SharedInventoryFunctions.getItem(_source, name , meta)
local data = {}
if name ~= nil then
Expand Down

0 comments on commit 3efbef0

Please sign in to comment.