Skip to content

Commit

Permalink
fix(server): unable to set new location
Browse files Browse the repository at this point in the history
  • Loading branch information
zozomanx authored Dec 19, 2024
1 parent b2f8798 commit 6bfb62e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions fxmanifest.lua
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ ox_lib 'locale'

shared_script {
'@ox_lib/init.lua',
'@qbx_core/modules/lib.lua',
}

server_scripts {
Expand Down
3 changes: 2 additions & 1 deletion server/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ RegisterNetEvent('qbx_diving:server:takeCoral', function(coralIndex)
pickedUpCoralIndexes[coralIndex] = true
TriggerClientEvent('qbx_diving:client:coralTaken', -1, coralIndex)
TriggerEvent('qbx_diving:server:coralTaken', sharedConfig.coralLocations[currentAreaIndex].corals[coralIndex].coords)
if #pickedUpCoralIndexes == sharedConfig.coralLocations[currentAreaIndex].maxHarvestAmount then

if qbx.table.size(pickedUpCoralIndexes) == sharedConfig.coralLocations[currentAreaIndex].maxHarvestAmount then
pickedUpCoralIndexes = {}
currentAreaIndex = getNewLocation()
TriggerClientEvent('qbx_diving:client:newLocationSet', -1, currentAreaIndex)
Expand Down

0 comments on commit 6bfb62e

Please sign in to comment.