Advanced (Realistic) Fishing - FiveM QBCore/ESX Script

Advanced (Realistic) Fishing - FiveM QBCore/ESX Script

Advanced Fishing is a QBCore/ESX FiveM Script that simulate realistic fishing technic by throwing the rod and wait for the fish to hook and then pulling the fish out, and a semi realistic opening the Treasure Box buy shooting the chest’s lock.

The script work with and without qb-target and also supports ox_target.
The script has an embedded Custom Notification.
We use a scan method to scan tha water on your way and check if there is a clear fishing path, that allows you to fish in every beach, sea, lakeevery place with water.
You just use The Fishing Rod and wait for the fish to hook, the hold and release the E button to pull the fish out.
You will notice the color of the button and the rod’s line turning red by holding too often.
You can a different types of fish, and if you’re lucky you may find a Treasure Box. You can place it on the ground by using the item, and shoot the Treasure’s lock to break open it and loot it.

Update:

  1. The Script is now working with both QBCore and ESX frameworks
  2. You can setup Custom Fishing Zones where you can fish a specific type of Fishes or a Treasure Box, and you can set multiple items per zone
  3. The Script is now working with okokNotify script (config file)

Config file:

  • You can choose the framework you’re using either qbcore or esx
  • You can choose the notification system between: script embedded notify, framework default notify or okokNotify for those who use okok notify script.
  • You can setup your Custom Fishing Zones where you can fish a specific type of Fishes or a Treasure Box, and you can set multiple items per zone
  • You can change the Fishing Difficulty Level from 1 to 5 / 1 = easy / 5 = hard.
  • You can change the Hooked Fish Movement Speed from 1 to 5 / 1 = slow / 5 = fast.
  • You can choose to use qb-target, ox_target or without.
  • You can setup the Peds coords, model. Blip name, color, sprite.
  • You can setup your fishing gear shop by adding or removing items.
  • You can setup the reward fishes catch chance and the sell price.
  • You can setup your Treasure Box random reward items.
  • You can use enable Require Job and set the fishing to a job, and you can change the job name.
  • The script is now Translatable.

Config File:

Config = {}

-- QBCore Framework
Config.Framework = "qbcore" -- Set you framework "qbcore" or "esx"
Config.QBCoreName = "qb-core" -- You QBCore script name must be correct to work (only if you use QBCore Framework)

-- ESX Framework
Config.IsESXLegacy = true -- Set it true is you're using esx legacy (only if you use ESX Framework)
Config.ESXLegacyName = "es_extended" -- You ESX Legacy script name must be correct to work (only if you use ESX Legacy Framework)

Config.Notification = "embedded" -- "embedded" embedded script custom notify / "default" framework default notify / "okok" custom okokNotify notify script
Config.EmojisInNotification = true -- This option available only in "embedded" notification

Config.FishHookTimeBetween = {6000, 12000} -- Estimated waiting time for the fish to be hooked after the rod is thrown, betweed 8000 (8 seconds) and 15000 (15 second)
Config.FishingDifficulty = 3 -- Fishing Difficulty Level from 1 to 5 / 1 = easy / 5 = hard
Config.HookedFishMovement = 3 -- Hooked Fish Movement Speed from 1 to 5 / 1 = slow / 5 = fast

Config.FishingLineChangesColor = true -- Set this to "false" if you don't want the fishing line to change colors

------------------------------------------------------------------------------------------------------------------
------------------------------------------------- Require Job ----------------------------------------------------

Config.RequireJob = false -- set to "true" if you want the player have a fishing job to be able to use the rod and fish
Config.JobName = 'fisher' -- set your fishing job name if you want to use Required Job option

------------------------------------------------------------------------------------------------------------------
------------------------------------------------ Target & Peds ---------------------------------------------------

Config.UseTarget = false -- "true" if you use qb-taget / "false" if not
Config.TargetType = "qb" -- Your target script type either "qb" or "ox"
Config.QBTargetScriptName = "qb-target" -- Your target script name must be correct to work
Config.OXTargetScriptName = "ox_target" -- Your target script name must be correct to work

Config.ShowBlips = true -- Enable/disable map blip

Config.FishingGearsSeller = { -- NPC Bot that can sell you fishing gears
	Enabled = true, -- Keep this to "true" if you want to keep this ped
	Ped = { -- Peds List: https://docs.fivem.net/docs/game-references/ped-models/
		Model = "a_m_m_trampbeac_01",
		Coords = vector4(-1803.68, -1197.97, 13.02, 49.88),
		Scenario = nil,
		Range = 3.0,
	},
	Blip = { -- Blips List: https://docs.fivem.net/docs/game-references/blips/
		Label = "Fishing Gears",
		Sprite = 52,
		Color = 3,
		Scale = 0.8,
	},
}

Config.UseOXInventoryShops = false -- Set this to "true" if you use OX Inventory Shops
Config.UseQuasarInventoryForESX = false -- Set this to "true" if you use Quasar Inventory on ESX Framework

Config.FishesBuyer = { -- NPC Bot that buy your fishes
	Enabled = true, -- Keep this to "true" if you want to keep this ped
	Ped = { -- Peds List: https://docs.fivem.net/docs/game-references/ped-models/
		Model = "a_m_o_beach_01",
		Coords = vector4(-1847.01, -1190.77, 14.32, 147.49),
		Scenario = nil,
		Range = 3.0,
	},
	Blip = { -- Blips List: https://docs.fivem.net/docs/game-references/blips/
		Label = "Fishes Buyer",
		Sprite = 266,
		Color = 3,
		Scale = 0.8,
	},
}

------------------------------------------------------------------------------------------------------------------
------------------------------------------------ Fishing Items ---------------------------------------------------

Config.FishingRodItem = "fishing_rod" -- Fishing Rod item name

Config.RequireBait = true -- "true" if player must have bait item in his inventory
Config.FishingBaitItem = "fishing_bait" -- Fishing Bait item name

------------------------------------------------------------------------------------------------------------------
----------------------------------------------- Gear Shop Items --------------------------------------------------

-- Setup your fishing gear shop by adding items
-- this section uses qb-inventory script to setup the shop

Config.ShopItems = {
	[1] = {
		label = "Fishing Rod",
		name = "fishing_rod",
		price = 500,
		amount = 1,
		info = {},
		type = "item",
		slot = 1,
	},
	[2] = {
		label = "Fishing Bait",
		name = "fishing_bait",
		price = 10,
		amount = 100,
		info = {},
		type = "item",
		slot = 2,
	},
}

------------------------------------------------------------------------------------------------------------------
------------------------------------------- Use Custom Fishing Zones ---------------------------------------------

-- You can Enable custom lakes beach or sea where you can find a specific type of fishes or a Treasure Box
-- If You Enable Custom Fishing zones, you need to setup the type of rewards and the catching chance

Config.EnableCustomFishingZones = false

Config.CustomFishingZones = { -- Zones coords and radius and the zone rewards
	[1] = { -- Small Lake
		Coords = vector3(2542.91, 6148.45, 161.11),
		Radius = 100.0,
		Rewards = {
			["sea_boot"] = {
				Chance = {1, 20},   -- Chance from 1 to 20 = 20% chance
			},
			
			["sea_tin"] = {
				Chance = {21, 40},  -- Chance from 21 to 40 = 20% chance
			},
			
			["fish_small"] = {
				Chance = {41, 90},  -- Chance from 41 to 90 = 50% chance
			},
			
			["fish_mackerel"] = {
				Chance = {91, 99},  -- Chance from 91 to 99 = 9% chance
			},
			
			["treasure_box"] =	{ -- Don't change the name, otherwise the treasure bow wont work / You can only remove it
				Chance = {100, 100},  -- Chance from 100 to 100 = 1% chance
			},
		},
		BlipForZone = {
			NormalBlip = {
				Active = false, -- Show custom area blip in the minimap
				Sprite = 68,
				Scale = 0.8,
				Color = 3,
				Text = 'Small Fishes Area'
			},
			RadiusBlip = {
				Active = false, -- Show custom area blip radius in the minimap
				Color = 3,
				Alpha = 150,
			}
		}
	},
	-- [2] = { -- Big Lake/Pool Exemple
		-- Coords = vector3(0.0, 0.0, 0.0),
		-- Radius = 50.0,
		-- Rewards = {}
	-- },
}

Config.RewardsOutOfCustomFishingZones = { -- Rewards when you use 'Custom Fishing Zones' and you fish out of Custom Fishing Zones
	["sea_boot"] = {
		Chance = {1, 25},   -- Chance from 1 to 25 = 25% chance
	},
	
	["sea_tin"] = {
		Chance = {26, 50},  -- Chance from 26 to 50 = 25% chance
	},
	
	["fish_small"] = {
		Chance = {51, 100},  -- Chance from 51 to 100 = 50% chance
	},
}

-- Note: The Fishing Rewards must be included in the 'Fishing Rewards' down bellow

------------------------------------------------------------------------------------------------------------------
----------------------------------------------- Fishing Rewards --------------------------------------------------

Config.FishingRewards = {
    ["sea_boot"] = {
		Chance = {1, 14},   -- Chance from 1 to 14 = 14% chance
		SellPrice = 100,	-- Change the sell price "100" or remove the entire line if you don't want this item to be sold
	},
	
    ["sea_tin"] = {
		Chance = {15, 27},  -- Chance from 15 to 27 = 13% chance
		SellPrice = 100,	-- Change the sell price "100" or remove the entire line if you don't want this item to be sold
	},
	
	["fish_small"] = {
		Chance = {28, 37},  -- Chance from 28 to 37 = 10% chance
		SellPrice = 100,	-- Change the sell price "100" or remove the entire line if you don't want this item to be sold
	},
	
    ["fish_bass"] = {
		Chance = {38, 47},  -- Chance from 38 to 47 = 10% chance
		SellPrice = 100,	-- Change the sell price "100" or remove the entire line if you don't want this item to be sold
	},
	
    ["fish_bluefish"] = {
		Chance = {48, 57},  -- Chance from 48 to 57 = 10% chance
		SellPrice = 100,	-- Change the sell price "100" or remove the entire line if you don't want this item to be sold
	},
	
    ["fish_cod"] = {
		Chance = {58, 67},  -- Chance from 58 to 67 = 10% chance
		SellPrice = 100,	-- Change the sell price "100" or remove the entire line if you don't want this item to be sold
	},
	
    ["fish_flounder"] = {
		Chance = {68, 77},  -- Chance from 68 to 77 = 10% chance
		SellPrice = 100,	-- Change the sell price "100" or remove the entire line if you don't want this item to be sold
	},
	
    ["fish_mackerel"] = {
		Chance = {78, 87},  -- Chance from 78 to 87 = 10% chance
		SellPrice = 100,	-- Change the sell price "100" or remove the entire line if you don't want this item to be sold
	},
	
    ["fish_dolphin"] = {
		Chance = {88, 91},  -- Chance from 88 to 91 = 4% chance
		SellPrice = 100,	-- Change the sell price "100" or remove the entire line if you don't want this item to be sold
	},
	
    ["fish_shark"] = {
		Chance = {92, 95},  -- Chance from 92 to 95 = 4% chance
		SellPrice = 100,	-- Change the sell price "100" or remove the entire line if you don't want this item to be sold
	},
	
    ["fish_whale"] = {
		Chance = {96, 99},  -- Chance from 96 to 99 = 4% chance
		SellPrice = 100,	-- Change the sell price "100" or remove the entire line if you don't want this item to be sold
	},
	
    ["treasure_box"] =	{ -- Don't change the name, otherwise the treasure bow wont work / You can only remove it
		Chance = {100, 100},  -- Chance from 100 to 100 = 1% chance
		RandomRewards = { -- Player will get a random reward between those
			{ item = 'gold_coin', amount = 100 },
			{ item = 'golden_pocket_watch', amount = 1 },
			{ item = 'weapon_vintagepistol', amount = 1 },
		},
	},
}

------------------------------------------------------------------------------------------------------------------
------------------------------------------------- Translation ----------------------------------------------------

Config.Translation = {
	['fishing_canceled']			= 'Fishing canceled',
	['cant_fish_while_swimming'] 	= 'You can\'t fish while in swimming',
	['cant_fish_while_inveh'] 		= 'You can\'t fish while in vehicle',
	['need_job'] 					= 'You need fishing job',
	['attempt_to_fish'] 			= 'Attempting to Fish',
	['need_fish_bait'] 				= 'You need a fish bait',
	['need_close_to_water'] 		= 'You need to be close and aim towards the water to fish.',
	['you_failed'] 					= 'You failed',
	['dont_have_enough_money'] 		= 'You don\'t have enough money',
	['cant_carry_more'] 			= 'You can\'t carry more',
	['item_bought_success'] 		= 'Item bought successfully',
	['item_not_found'] 				= 'Item not found',
	['you_caught_fish'] 			= 'You caught a ',
	['fishes_sold_for_amount'] 		= 'Fishes sold for $',
	['dont_have_enough_fishes'] 	= 'You don\'t have enough fishes',
	['already_placed_treasure'] 	= 'You already placed a Treasure Box',
	['treasure_item_not_found'] 	= 'Treasure Box item\'s not found',
	
	['buy'] 				 		= 'Buy',
	['fishing_gears_shop']  		= 'Fishing Gears Shop',
	['fishing_shop'] 				= 'Fishing Shop',
	
	['press_e_to_buy_gears'] 		= 'Press ~INPUT_CONTEXT~ to open Fishing Gears Shop',
	['press_e_to_sell_fishes'] 		= 'Press ~INPUT_CONTEXT~ to sell Fishes',
	
	['shoot-lockpick-treasure'] 	= '~o~Shoot~w~ or ~o~lockpick~w~ the ~b~lock~w~ to open the box',
	['get-close-to-treasure'] 		= 'Get ~b~close~w~ to the ~y~Treasure Box to loot',
	['searching-the-treasure'] 		= '~g~Searching the box',
	
	['target-fishing-gears'] 		= 'Fishing Gears',
	['target-sell-fishes']	 		= 'Sell Your Fishes',
}

Perview Video: Youtube Link
Buy Script: Tebex Link ($15.99 + Tax)

You might like one of my scripts

Code is accessible config
Subscription-based No
Lines (approximately) 1550
Requirements QBCore or ESX
Support Yes
13 Likes

Hi, you know a ETA for ESX Version? Im really interested.

Also: is it possible to insert his own notify?

Thank you, nice release.

2 Likes

next week the ESX version will be ready
and by saying “is it possible to insert his own notify?” you mean your own server notify ?

1 Like

yes, im using okokNotify for all my scripts and want to use it for this too.

2 Likes

i will add a custom notification option in the config file in the next update allows you to choose either the use the script’s notification system or add you server custom notification export/event.

1 Like

New Update: The Script is now working with both QBCore and ESX frameworks.

1 Like

Hello

Can you sell the Open Source script ? I will be interested :slight_smile:
Cheers

1 Like

Hi @NakNak_NC :slightly_smiling_face:
the open source version of the script is not available for sale right now.
maybe in the next few months I will :blush:.

1 Like

Hi @dalifoughali !

Thanks for the reply.
So maybe you can add a little something for me : I want to block it for a job only.
Can you made this possible by adding a possible job check (if Config.Job ~= “”) when using the rod ?

If possible, I might be able to buy :smiley:

Cheers

1 Like

@NakNak_NC of course :blush:
I’ll add it as a configuration in the config file.

does it spawn a fish?

1 Like

Hi @Phallong_Rodriguez, no it’s just the line that you’re pulling.

if u can add the treasure box prop, why not add fish props as well for added realism :slight_smile:

1 Like

I already thought about it. And the goal from the script is the unknown reward, and by making the player can know what he’s fishing, there will be no surprise and all players will keep canceling the fishing untill they catch something valuable, because they already knows what’s they are fishing.

we can add many valuables as we want, depends on how we config it. Not having the option to add props is the only thing preventing me for purchasing ur script :slight_smile:

1 Like

unfortunately adding props is not available now.

Would love to see fish props when reeling in!

For example, at the end of line do an attach entity function,
spawn ped and attach “A_C_Fish” for a regular fish.

Would give more realism! :smiley:

hi @SAVRP
for sure it would, but did you consider pulling out a treasure box or a boot or a tin? the prop wont make sense if you see a treasure box in the water moving right and left and running away from you.
and in this case the player will know what he’s fishing while fishing, and this will eliminate the idea of the surprising reward.

1 Like

does it allow fishing in rivers? narrow streams etc?

yes, every place with a water in it.