i install it and follow all steps everythings work except log for drop/pickup items , weapons , dirtymoney .... etc
this is esx_extended
local sourceXPlayer = ESX.GetPlayerFromId(_source)
local targetXPlayer = ESX.GetPlayerFromId(target)
if type == 'item_standard' then
local sourceItem = sourceXPlayer.getInventoryItem(itemName)
local targetItem = targetXPlayer.getInventoryItem(itemName)
if itemCount > 0 and sourceItem.count >= itemCount then
if targetItem.limit ~= -1 and (targetItem.count + itemCount) > targetItem.limit then
TriggerClientEvent('esx:showNotification', _source, _U('ex_inv_lim', targetXPlayer.name))
else
sourceXPlayer.removeInventoryItem(itemName, itemCount)
targetXPlayer.addInventoryItem (itemName, itemCount)
TriggerClientEvent('esx:showNotification', _source, _U('gave_item', itemCount, ESX.Items[itemName].label, targetXPlayer.name))
TriggerClientEvent('esx:showNotification', target, _U('received_item', itemCount, ESX.Items[itemName].label, sourceXPlayer.name))
TriggerEvent("esx:giveitemalert",sourceXPlayer.name,targetXPlayer.name,ESX.Items[itemName].label,itemCount)
end
else
TriggerClientEvent('esx:showNotification', _source, _U('imp_invalid_quantity'))
end
elseif type == 'item_money' then
if itemCount > 0 and sourceXPlayer.getMoney() >= itemCount then
sourceXPlayer.removeMoney(itemCount)
targetXPlayer.addMoney (itemCount)
TriggerClientEvent('esx:showNotification', _source, _U('gave_money', ESX.Math.GroupDigits(itemCount), targetXPlayer.name))
TriggerClientEvent('esx:showNotification', target, _U('received_money', ESX.Math.GroupDigits(itemCount), sourceXPlayer.name))
TriggerEvent("esx:givemoneyalert",sourceXPlayer.name,targetXPlayer.name,itemCount)
else
TriggerClientEvent('esx:showNotification', _source, _U('imp_invalid_amount'))
end
elseif type == 'item_account' then
if itemCount > 0 and sourceXPlayer.getAccount(itemName).money >= itemCount then
sourceXPlayer.removeAccountMoney(itemName, itemCount)
targetXPlayer.addAccountMoney (itemName, itemCount)
TriggerClientEvent('esx:showNotification', _source, _U('gave_account_money', ESX.Math.GroupDigits(itemCount), Config.AccountLabels[itemName], targetXPlayer.name))
TriggerClientEvent('esx:showNotification', target, _U('received_account_money', ESX.Math.GroupDigits(itemCount), Config.AccountLabels[itemName], sourceXPlayer.name))
TriggerEvent("esx:givemoneybankalert",sourceXPlayer.name,targetXPlayer.name,itemCount)
else
TriggerClientEvent('esx:showNotification', _source, _U('imp_invalid_amount'))
end
elseif type == 'item_weapon' then
if not targetXPlayer.hasWeapon(itemName) then
sourceXPlayer.removeWeapon(itemName)
targetXPlayer.addWeapon(itemName, itemCount)
local weaponLabel = ESX.GetWeaponLabel(itemName)
if itemCount > 0 then
TriggerClientEvent('esx:showNotification', _source, _U('gave_weapon_ammo', weaponLabel, itemCount, targetXPlayer.name))
TriggerClientEvent('esx:showNotification', target, _U('received_weapon_ammo', weaponLabel, itemCount, sourceXPlayer.name))
TriggerEvent("esx:giveweaponalert",sourceXPlayer.name,targetXPlayer.name,weaponLabel)
else
TriggerClientEvent('esx:showNotification', _source, _U('gave_weapon', weaponLabel, targetXPlayer.name))
TriggerClientEvent('esx:showNotification', target, _U('received_weapon', weaponLabel, sourceXPlayer.name))
end
else
TriggerClientEvent('esx:showNotification', _source, _U('gave_weapon_hasalready', targetXPlayer.name, weaponLabel))
TriggerClientEvent('esx:showNotification', _source, _U('received_weapon_hasalready', sourceXPlayer.name, weaponLabel))
end
end
if xPlayer.job.name == society then
if amount and amount > 0 and account.money >= amount then
xPlayer.removeAccountMoney('black_money', amount)
MySQL.Async.execute('INSERT INTO society_moneywash (identifier, society, amount) VALUES (@identifier, @society, @amount)', {
['@identifier'] = xPlayer.identifier,
['@society'] = society,
['@amount'] = amount
}, function(rowsChanged)
TriggerClientEvent('esx:showNotification', _source, _U('you_have', ESX.Math.GroupDigits(amount)))
TriggerEvent("esx:washingmoneyalert",xPlayer.name,amount)
end)
else
TriggerClientEvent('esx:showNotification', _source, _U('invalid_amount'))
end
else
print(('esx_society: %s attempted to call washMoney!'):format(xPlayer.identifier))
end