Skip to content

Commit

Permalink
retrait notif si même inventaire
Browse files Browse the repository at this point in the history
  • Loading branch information
Kedrihan committed Jul 18, 2024
1 parent c300b15 commit a38cdf5
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions resources/[soz]/soz-inventory/server/events.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a38cdf5

Please sign in to comment.