if item.type == 'item_standard' then
xPlayer.removeInventoryItem(item.name, count)
tPlayer.addInventoryItem(item.name, count)
TriggerClientEvent('mythic_notify:client:SendAlert', xPlayer.source, { type = 'success', text = tPlayer.name .. ' Adlı kişiye ' .. item.name .. " x".. count .. " Verdin" })
TriggerClientEvent('mythic_notify:client:SendAlert', tPlayer.source, { type = 'success', text = xPlayer.name .. ' Adlı kişiden ' .. item.name .. " x".. count .. " Aldın"})
cb(1)
elseif item.type == 'item_money' then
xPlayer.removeMoney(count)
tPlayer.addMoney(count)
TriggerClientEvent('mythic_notify:client:SendAlert', xPlayer.source, { type = 'success', text = tPlayer.name .. ' Adlı kişiye Nakit' .. " x".. count .. " Verdin" })
TriggerClientEvent('mythic_notify:client:SendAlert', tPlayer.source, { type = 'success', text = xPlayer.name .. ' Adlı kişiden Nakit' .. " x".. count .. " Aldın"})
cb(1)
elseif item.type == 'item_account' then
xPlayer.removeAccountMoney(item.name, count)
tPlayer.addAccountMoney(item.name, count)
TriggerClientEvent('mythic_notify:client:SendAlert', xPlayer.source, { type = 'success', text = tPlayer.name .. ' Adlı kişiye Kara Para' .. " x".. count .. " Verdin" })
TriggerClientEvent('mythic_notify:client:SendAlert', tPlayer.source, { type = 'success', text = xPlayer.name .. ' Adlı kişiden Kara Para' .. " x".. count .. " Aldın"})
cb(1)
elseif item.type == 'item_weapon' then
if xPlayer.hasWeapon(item.name) then
if not tPlayer.hasWeapon(item.name) then
xPlayer.removeWeapon(item.name)
tPlayer.addWeapon(item.name, count)
TriggerClientEvent('mythic_notify:client:SendAlert', xPlayer.source, { type = 'success', text = tPlayer.name .. ' Adlı kişiye '.. item.name .. " x".. count .. " Verdin" })
TriggerClientEvent('mythic_notify:client:SendAlert', tPlayer.source, { type = 'success', text = xPlayer.name .. ' Adlı kişiden '.. item.name .. " x".. count .. " Aldın"})
cb(1)
else
TriggerClientEvent('mythic_notify:client:SendAlert', src, { type = 'error', text = 'Aynı silaha zaten sahip!'})
cb(nil)
end
end
end