diff --git a/config.lua b/config.lua index 390adbd..41c8400 100644 --- a/config.lua +++ b/config.lua @@ -38,7 +38,6 @@ Config.CoralLocations = { }, } }, - DefaultCoral = 4, TotalCoral = 4, }, { @@ -69,7 +68,6 @@ Config.CoralLocations = { }, } }, - DefaultCoral = 3, TotalCoral = 3, }, { @@ -100,7 +98,6 @@ Config.CoralLocations = { }, } }, - DefaultCoral = 3, TotalCoral = 3, }, { @@ -131,7 +128,6 @@ Config.CoralLocations = { }, } }, - DefaultCoral = 3, TotalCoral = 3, }, { @@ -169,7 +165,6 @@ Config.CoralLocations = { }, } }, - DefaultCoral = 4, TotalCoral = 4, }, { @@ -207,7 +202,6 @@ Config.CoralLocations = { }, } }, - DefaultCoral = 4, TotalCoral = 4, }, { @@ -245,7 +239,6 @@ Config.CoralLocations = { }, } }, - DefaultCoral = 4, TotalCoral = 4, }, } diff --git a/server/main.lua b/server/main.lua index 0c2e81d..e295b7d 100644 --- a/server/main.lua +++ b/server/main.lua @@ -74,7 +74,7 @@ RegisterNetEvent('qb-diving:server:TakeCoral', function(area, coral, bool) for _, v in pairs(Config.CoralLocations[currentDivingArea].coords.Coral) do v.PickedUp = false end - Config.CoralLocations[currentDivingArea].TotalCoral = Config.CoralLocations[currentDivingArea].DefaultCoral + Config.CoralLocations[currentDivingArea].TotalCoral = #Config.CoralLocations[currentDivingArea].coords.Coral local newLocation = math.random(1, #Config.CoralLocations) while newLocation == currentDivingArea do newLocation = math.random(1, #Config.CoralLocations)