ESX i dont see here QB LOL and show more the server side
QBCore.Functions.CreateCallback('wasabi_ambulance:removeItemsOnDeath', function(source, cb)
local xPlayer = QBCore.Functions.GetPlayer(source)
if xPlayer.PlayerData.money > 0 then
xPlayer.Functions.RemoveMoney('cash', xPlayer.PlayerData.money)
end
if xPlayer.PlayerData.accounts['black_money'].money > 0 then
xPlayer.Functions.RemoveMoney('black_money', xPlayer.PlayerData.accounts['black_money'].money)
end
if Config.Inventory == 'qs' then
local qPlayer = QBCore.Functions.GetPlayer(source)
qPlayer.Functions.ClearInventory()
qPlayer.Functions.ClearLoadout()
elseif Config.Inventory == 'ox' then
exports.ox_inventory:ClearInventory(source)
elseif Config.Inventory == 'mf' then
exports["mf-inventory"]:clearInventory(xPlayer.PlayerData.identifier)
exports["mf-inventory"]:clearLoadout(xPlayer.PlayerData.identifier)
else
for k, v in pairs(xPlayer.PlayerData.items) do
if v.amount > 0 then
xPlayer.Functions.RemoveItem(v.name, v.amount)
end
end
end
cb()
end)