Skip to content

Commit

Permalink
Fix when stop script remove ox_doors
Browse files Browse the repository at this point in the history
  • Loading branch information
y0p4 committed Oct 29, 2024
1 parent bc83824 commit 75b9311
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions client/cl_property.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion client/client.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 75b9311

Please sign in to comment.