From d21d04f606852c203fb012f00b66cda0c56053a8 Mon Sep 17 00:00:00 2001 From: Bxio Date: Mon, 3 Aug 2026 11:58:50 +0000 Subject: [PATCH] Add debug logging to onClientResourceStop cleanup, bump to 1.1.5 Temporary tracing to diagnose why safe props still show after resource stop despite DeleteObject being called. --- client.lua | 4 ++++ fxmanifest.lua | 2 +- version.json | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/client.lua b/client.lua index 38c88c9..ddb0368 100644 --- a/client.lua +++ b/client.lua @@ -292,11 +292,15 @@ end) AddEventHandler('onClientResourceStop', function(resourceName) if resourceName ~= GetCurrentResourceName() then return end + dbg('onClientResourceStop disparado, limpando', tostring(next(spawnedSafes) and 'safes existentes' or 'nenhum safe')) + for id, ent in pairs(spawnedSafes) do + dbg('safe', id, 'entity', ent, 'DoesEntityExist antes:', DoesEntityExist(ent)) if ent and DoesEntityExist(ent) then pcall(function() ox_target:removeLocalEntity(ent) end) FreezeEntityPosition(ent, false) DeleteObject(ent) + dbg('safe', id, 'DoesEntityExist depois do DeleteObject:', DoesEntityExist(ent)) end spawnedSafes[id] = nil end diff --git a/fxmanifest.lua b/fxmanifest.lua index 1922ea9..a68ba58 100644 --- a/fxmanifest.lua +++ b/fxmanifest.lua @@ -4,7 +4,7 @@ lua54 'yes' author 'SeuNome' description 'Sistema de safes com ox_inventory e ox_target' -version '1.1.4' +version '1.1.5' -- DependĂȘncias dependencies { diff --git a/version.json b/version.json index d7b0b6d..d4fe37d 100644 --- a/version.json +++ b/version.json @@ -1,3 +1,3 @@ { - "version": "1.1.4" + "version": "1.1.5" }