From a38cdf5a38563b330a9a4a165345cdd68013e15e Mon Sep 17 00:00:00 2001 From: Kedrihan Date: Thu, 18 Jul 2024 19:07:04 +0200 Subject: [PATCH] =?UTF-8?q?retrait=20notif=20si=20m=C3=AAme=20inventaire?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- resources/[soz]/soz-inventory/server/events.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/resources/[soz]/soz-inventory/server/events.lua b/resources/[soz]/soz-inventory/server/events.lua index 96e61f5ade..4f83572d0a 100644 --- a/resources/[soz]/soz-inventory/server/events.lua +++ b/resources/[soz]/soz-inventory/server/events.lua @@ -66,14 +66,16 @@ QBCore.Functions.CreateCallback("inventory:server:TransfertItem", local coord2 = GetEntityCoords(GetPlayerPed(targetInv.id)) if (#(coord1 - coord2) > 10) then - exports["soz-core"]:Report(source, "Vol de d'objet", targetInv.owner, item .. " " .. amount, { + exports["soz-core"]:Report(source, "Vol de l'objet", targetInv.owner, item .. " " .. amount, { coord1.x, coord1.y, coord1.z, }); end - TriggerClientEvent("soz-core:client:notification:draw", sourceInv.id, + if sourceInv.id ~= targetInv.id then + TriggerClientEvent("soz-core:client:notification:draw", sourceInv.id, string.format("On vous a pris ~r~%s %s", amount, QBCore.Shared.Items[item].label)) + end end local sourceInventory = sourceInv