diff --git a/server-data/resources/[bpt_addons]/bpt_pointsell/config.lua b/server-data/resources/[bpt_addons]/bpt_pointsell/config.lua index 06c24efb3..24f9ef186 100644 --- a/server-data/resources/[bpt_addons]/bpt_pointsell/config.lua +++ b/server-data/resources/[bpt_addons]/bpt_pointsell/config.lua @@ -5,6 +5,10 @@ Config.Locale = GetConvar("esx:locale", "it") Config.DealerItems = { emerald = 50, diamond = 150, + tuna = 300, + salmon = 230, + trout = 190, + anchovy = 100, } Config.GiveBlack = true -- give black money? if disabled it'll give regular cash. diff --git a/server-data/resources/[wasabi]/wasabi_fishing/README.md b/server-data/resources/[wasabi]/wasabi_fishing/README.md index 357874a31..94850a0c5 100644 --- a/server-data/resources/[wasabi]/wasabi_fishing/README.md +++ b/server-data/resources/[wasabi]/wasabi_fishing/README.md @@ -10,11 +10,9 @@ This resource was created as a free interactive fishing script for ESX/QBCore se - Chance of fishing rod breaking upon failing skill-check(Can be changed in config) - Configurable random wait time for getting bite on line - Configurable fishing rewards(4 by default included) -- Configurable prices to sell fishing rewards - Configurable skill-check difficulty per fishing reward - Ability to fish from boat, pier, or anywhere with a body of water - No job requirement -- Fully configurable fish buyer to sell fish ## Dependencies - es_extended OR qb-core diff --git a/server-data/resources/[wasabi]/wasabi_fishing/client/client.lua b/server-data/resources/[wasabi]/wasabi_fishing/client/client.lua index 898a248b8..584459d02 100644 --- a/server-data/resources/[wasabi]/wasabi_fishing/client/client.lua +++ b/server-data/resources/[wasabi]/wasabi_fishing/client/client.lua @@ -1,53 +1,5 @@ local fishing = false -if Config.sellShop.enabled then - CreateThread(function() - local ped, textUI - CreateBlip(Config.sellShop.coords, 356, 1, Strings.sell_shop_blip, 0.80) - local point = lib.points.new({ - coords = Config.sellShop.coords, - distance = 30, - }) - - function point:nearby() - if self.currentDistance < self.distance then - if not ped then - lib.requestAnimDict("mini@strip_club@idles@bouncer@base", 100) - lib.requestModel(Config.sellShop.ped, 100) - ped = CreatePed(28, Config.sellShop.ped, Config.sellShop.coords.x, Config.sellShop.coords.y, Config.sellShop.coords.z, Config.sellShop.heading, false, false) - FreezeEntityPosition(ped, true) - SetEntityInvincible(ped, true) - SetBlockingOfNonTemporaryEvents(ped, true) - TaskPlayAnim(ped, "mini@strip_club@idles@bouncer@base", "base", 8.0, 0.0, -1, 1, 0, 0, 0, 0) - end - if self.currentDistance <= 1.8 then - if not textUI then - lib.showTextUI(Strings.sell_fish) - textUI = true - end - if IsControlJustReleased(0, 38) then - FishingSellItems() - end - elseif self.currentDistance >= 1.9 and textUI then - lib.hideTextUI() - textUI = nil - end - end - end - - function point:onExit() - if ped then - local model = GetEntityModel(ped) - SetModelAsNoLongerNeeded(model) - DeletePed(ped) - SetPedAsNoLongerNeeded(ped) - RemoveAnimDict("mini@strip_club@idles@bouncer@base") - ped = nil - end - end - end) -end - RegisterNetEvent("wasabi_fishing:startFishing", function() if IsPedInAnyVehicle(cache.ped) or IsPedSwimming(cache.ped) then TriggerEvent("wasabi_fishing:notify", Strings.cannot_perform, Strings.cannot_perform_desc, "error") diff --git a/server-data/resources/[wasabi]/wasabi_fishing/client/functions.lua b/server-data/resources/[wasabi]/wasabi_fishing/client/functions.lua index ffce76cff..c365904ad 100644 --- a/server-data/resources/[wasabi]/wasabi_fishing/client/functions.lua +++ b/server-data/resources/[wasabi]/wasabi_fishing/client/functions.lua @@ -26,7 +26,3 @@ end TryFish = function(data) TriggerServerEvent("wasabi_fishing:tryFish", data) end - -FishingSellItems = function() - TriggerServerEvent("wasabi_fishing:sellFish") -end diff --git a/server-data/resources/[wasabi]/wasabi_fishing/configuration/config.lua b/server-data/resources/[wasabi]/wasabi_fishing/configuration/config.lua index 054cd5558..da5c50ad0 100644 --- a/server-data/resources/[wasabi]/wasabi_fishing/configuration/config.lua +++ b/server-data/resources/[wasabi]/wasabi_fishing/configuration/config.lua @@ -4,13 +4,6 @@ Config = {} Config.checkForUpdates = true -- Check for updates? Config.oldESX = false -- Nothing to do with qb / Essentially when set to true it disables the check of if player can carry item -Config.sellShop = { - enabled = true, - coords = vec3(-1612.19, -989.18, 13.01 - 0.9), -- X, Y, Z Coords of where fish buyer will spawn - heading = 45.3, -- Heading of fish buyer ped - ped = "cs_old_man2", -- Ped name here -} - Config.bait = { itemName = "fishbait", -- Item name of bait loseChance = 65, -- Chance of loosing bait(Setting to 100 will use bait every cast) @@ -27,11 +20,11 @@ Config.timeForBite = { -- Set min and max random range of time it takes for fish } Config.fish = { - { item = "tuna", label = "Tuna", price = { 300, 550 }, difficulty = { "medium", "easy", "easy" } }, -- name is the item name of the fish(must be in DB of items) / Price is the range of price it will sell to fish buyer / difficulty is how many & how hard skillcheck is - { item = "salmon", label = "Salmon", price = { 235, 300 }, difficulty = { "medium", "easy" } }, - { item = "trout", label = "Trout", price = { 190, 235 }, difficulty = { "easy", "easy" } }, - { item = "anchovy", label = "Anchovy", price = { 100, 190 }, difficulty = { "easy" } }, - { item = "plastic_bag", label = "Plastic Bag", price = { 100, 190 }, difficulty = { "easy" } }, + { item = "tuna", label = "Tuna", difficulty = { "easy" } }, + { item = "salmon", label = "Salmon", difficulty = { "easy" } }, + { item = "trout", label = "Trout", difficulty = { "easy" } }, + { item = "anchovy", label = "Anchovy", difficulty = { "easy" } }, + { item = "plastic_bag", label = "Plastic Bag", difficulty = { "easy" } }, } RegisterNetEvent("wasabi_fishing:notify") diff --git a/server-data/resources/[wasabi]/wasabi_fishing/configuration/strings.lua b/server-data/resources/[wasabi]/wasabi_fishing/configuration/strings.lua index 90e71e2ca..5055d6d7b 100644 --- a/server-data/resources/[wasabi]/wasabi_fishing/configuration/strings.lua +++ b/server-data/resources/[wasabi]/wasabi_fishing/configuration/strings.lua @@ -14,8 +14,6 @@ Strings = { bait_lost_desc = "Fishing bait was lost.", fish_success = "Caught Fish", fish_success_desc = "You caught a %s!", - sell_shop_blip = "Fish Market", - sell_fish = "[E] - Sell Fish", kicked = "Nice try, please do not attempt to exploit!", sold_for = "Sold Fish", sold_for_desc = "You sold %sx %s for $%s", diff --git a/server-data/resources/[wasabi]/wasabi_fishing/server/server.lua b/server-data/resources/[wasabi]/wasabi_fishing/server/server.lua index 01401b920..a8af35788 100644 --- a/server-data/resources/[wasabi]/wasabi_fishing/server/server.lua +++ b/server-data/resources/[wasabi]/wasabi_fishing/server/server.lua @@ -50,33 +50,6 @@ RegisterNetEvent("wasabi_fishing:tryFish", function(data) end end) -RegisterNetEvent("wasabi_fishing:sellFish", function() - local playerPed = GetPlayerPed(source) - local playerCoord = GetEntityCoords(playerPed) - local distance = #(playerCoord - Config.sellShop.coords) - if distance == nil then - KickPlayer(source, Strings.kicked) - return - end - if distance > 3 then - KickPlayer(source, Strings.kicked) - return - end - for i = 1, #Config.fish do - if HasItem(source, Config.fish[i].item) > 0 then - local rewardAmount = 0 - for j = 1, HasItem(source, Config.fish[i].item) do - rewardAmount = rewardAmount + math.random(Config.fish[i].price[1], Config.fish[i].price[2]) - end - if rewardAmount > 0 then - AddMoney(source, "money", rewardAmount) - TriggerClientEvent("wasabi_fishing:notify", source, Strings.sold_for, (Strings.sold_for_desc):format(HasItem(source, Config.fish[i].item), Config.fish[i].label, addCommas(rewardAmount)), "success") - RemoveItem(source, Config.fish[i].item, HasItem(source, Config.fish[i].item)) - end - end - end -end) - RegisterUsableItem(Config.fishingRod.itemName, function(source) TriggerClientEvent("wasabi_fishing:startFishing", source) end)