From 75b9311fb52ff95541d131c8f56fe1e3e9f184e4 Mon Sep 17 00:00:00 2001 From: y0p4 Date: Tue, 29 Oct 2024 21:49:59 +0300 Subject: [PATCH] Fix when stop script remove ox_doors --- client/cl_property.lua | 4 ++-- client/client.lua | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/client/cl_property.lua b/client/cl_property.lua index f01b275..89c7f2c 100644 --- a/client/cl_property.lua +++ b/client/cl_property.lua @@ -707,7 +707,7 @@ function Property:RemoveBlip() self.blip = nil end -function Property:RemoveProperty() +function Property:RemoveProperty(doors) if Config.Target == "ox" then Framework[Config.Target].RemoveTargetZone(self.entranceTarget) else @@ -738,7 +738,7 @@ function Property:RemoveProperty() self:RemoveBlip() self:LeaveShell() self:UnregisterGarageZone() - TriggerEvent('ps-housing:client:DeleteOxDoors',self.property_id) + if doors then TriggerEvent('ps-housing:client:DeleteOxDoors', self.property_id) end --@@ comeback to this -- Think it works now if self.propertyData.apartment then diff --git a/client/client.lua b/client/client.lua index 3792d14..3cd4c9a 100644 --- a/client/client.lua +++ b/client/client.lua @@ -11,7 +11,7 @@ RegisterNetEvent('ps-housing:client:removeProperty', function (property_id) local property = Property.Get(property_id) if property then - property:RemoveProperty() + property:RemoveProperty(true) end PropertiesTable[property_id] = nil