Skip to content

Commit

Permalink
fix(client/main): blips
Browse files Browse the repository at this point in the history
  • Loading branch information
Manason committed Nov 9, 2023
1 parent bf9dd9d commit ca2e62e
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions client/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ local blips = {}

local function takeCoral(coralIndex)
local times = math.random(2, 5)
FreezeEntityPosition(cache.ped, true)

if lib.progressBar({
duration = times * 1000,
label = Lang:t('info.collecting_coral'),
Expand All @@ -33,9 +31,6 @@ local function takeCoral(coralIndex)
TriggerEvent('qbx_diving:client:coralTaken', coralIndex)
TriggerServerEvent('qbx_diving:server:takeCoral', coralIndex)
end

ClearPedTasks(cache.ped)
FreezeEntityPosition(cache.ped, false)
end

local function clearCoralZones()
Expand All @@ -60,8 +55,8 @@ local function clearAreaBlips()
blips = {}
end

local function createAreaBlips(area)
local coords = Config.CoralLocations[area].blip
local function createAreaBlips(areaIndex)
local coords = Config.CoralLocations[areaIndex].blip
local radiusBlip = AddBlipForRadius(coords.x, coords.y, coords.z, 100.0)
SetBlipRotation(radiusBlip, 0)
SetBlipColour(radiusBlip, 47)
Expand Down Expand Up @@ -131,7 +126,7 @@ local function setDivingLocation(areaIndex, pickedUpCoralIndexes)
createCoralZones(areaIndex, pickedUpCoralIndexes)

clearAreaBlips()
blips = createAreaBlips()
blips = createAreaBlips(areaIndex)
end

local function sellCoral()
Expand Down

0 comments on commit ca2e62e

Please sign in to comment.