Skip to content

Commit

Permalink
remove polyzone for lib zone
Browse files Browse the repository at this point in the history
  • Loading branch information
ImXirvin committed Jul 24, 2023
1 parent 84de288 commit 18e4fe0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 14 deletions.
20 changes: 8 additions & 12 deletions client/cl_property.lua
Original file line number Diff line number Diff line change
Expand Up @@ -180,19 +180,15 @@ function Property:RegisterGarageZone()

TriggerEvent("qb-garages:client:addHouseGarage", self.property_id, data)

self.garageZone = BoxZone:Create(vector3(garageData.x + 5.0, garageData.y + 5.0, garageData.z), garageData.length,
garageData.width, {
name = garageName,
debugPoly = Config.DebugMode,
minZ = garageData.z - 1.0,
maxZ = garageData.z + 3.0
})

self.garageZone:onPlayerInOut(function(isPointInside, point)
if isPointInside then
self.garageZone = lib.zones.box({
coords = vec3(garageData.x, garageData.y, garageData.z),
size = vector3(garageData.length + 5.0, garageData.width + 5.0, 3.5),
rotation = 45,
debug = Config.DebugMode,
onEnter = function()
TriggerEvent('qb-garages:client:setHouseGarage', self.property_id, true)
end
end)
end,
})
end

function Property:UnregisterGarageZone()
Expand Down
2 changes: 0 additions & 2 deletions fxmanifest.lua
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ shared_script {
}

client_script {
'@PolyZone/client.lua',
'@PolyZone/BoxZone.lua',
'client/apartment.lua',
'client/cl_property.lua',
'client/client.lua',
Expand Down

0 comments on commit 18e4fe0

Please sign in to comment.