Skip to content

Commit

Permalink
Merge pull request #37 from t0r3tto/main
Browse files Browse the repository at this point in the history
fix/chore: initialize exit target/zone upon character load + typo correction
  • Loading branch information
GhzGarage authored May 23, 2024
2 parents 54e91cc + cb082e6 commit 2d8ea52
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions client/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ local function DestroyDeliveryTarget()
end
end

local function DestoryInsideZones()
local function DestroyInsideZones()
DestroyPickupTarget()
DestroyExitTarget()
DestroyDutyTarget()
Expand Down Expand Up @@ -361,7 +361,7 @@ local function EnterLocation()
isInsideDutyZone = false
isInsideEntranceZone = false

DestoryInsideZones()
DestroyInsideZones()
RegisterExitTarget()
RegisterDutyTarget()
end
Expand All @@ -380,7 +380,7 @@ local function ExitLocation()
isInsideDutyZone = false
isInsideEntranceZone = false

DestoryInsideZones()
DestroyInsideZones()

if carryPackage then
DropPackage()
Expand Down Expand Up @@ -438,6 +438,10 @@ end

-- Events

RegisterNetEvent('QBCore:Client:OnPlayerLoaded', function()
RegisterExitTarget()
end)

RegisterNetEvent('qb-recyclejob:client:target:enterLocation', function()
EnterLocation()
end)
Expand Down

0 comments on commit 2d8ea52

Please sign in to comment.