Take on exciting daily challenges to boost your fishing skills and earn exclusive rewards! Each day, receive a fresh set of tasks designed to test your angling abilities and add variety to your fishing adventures.
Unique Challenges: Complete specific tasks, like catching certain types of fish or achieving a high catch count within a time limit.
Reward System: Earn special items, XP, or in-game currency by completing tasks, making each day’s efforts worthwhile.
Progress Tracking: Stay motivated by tracking your daily accomplishments and progress towards your fishing goals.
Keep your fishing journey exciting and rewarding every day with Daily Tasks!
These functions simplify item removal and addition, adapting seamlessly to different frameworks. Configuring these directly in the Config allows for effortless adjustments to match your framework setup.
Inventory Management Functions
Remove Function
This function removes a specified amount of an item from a player’s inventory. The behavior adapts based on the configured framework (QBCore or other):
Remove = function(Player, Item, Amount)
if Config.Framework == "QBCore" or Config.Framework == "OLDQBCore" then
return Player.Functions.RemoveItem(Item, Amount)
else
return Player.removeInventoryItem(Item, Amount)
end
end
Other Frameworks: Uses Player.removeInventoryItem for compatibility.
Add Function
This function adds a specified amount of an item to a player’s inventory. Like the Remove function, it adjusts based on the active framework:
Add = function(Player, Item, Amount)
if Config.Framework == "QBCore" or Config.Framework == "OLDQBCore" then
return Player.Functions.AddItem(Item, tonumber(Amount))
else
return Player.addInventoryItem(Item, tonumber(Amount))
end
end
Why This Approach?
By structuring these item management functions in Config, you gain flexibility for future updates and compatibility across frameworks.
Here's an engaging English explanation for your configuration options:
Configuration Overview
Customize your FiveM fishing experience through this config file, adjusting everything from framework type to item drop rates.
Key Settings
Framework: Choose between QBCore, ESX, OLDQBCore, or NewESX based on your server’s setup.
Webhook: Set a URL here to send fishing-related logs or updates directly to your Discord.
Each rod type provides a different drop rate for catching fish. Adjust these values to set probabilities, adding variety and rewards:
Basic Rod (basic_rod): Drop rate of 0.2, meaning there's a chance of doubling the catch.
Graphite Rod (graphite_rod): Drop rate of 0.3, offering a higher probability for extra catches.
Titanium Rod (titanium_rod): Drop rate of 0.4, maximizing the chances for multiple catches with each reel.
InteractionText = {
sea = "[E] Engage with the Fishing Store", -- Text for interacting with the Fishing Store NPC
boat = "[E] Access Premium Boat Rental Services" -- Text for accessing Boat Rental services
},
Rod = {
['basic_rod'] = {
drop = 0.2, -- Basic Rod: 0.2 drop rate, occasionally gives a double catch
},
['graphite_rod'] = {
drop = 0.3, -- Graphite Rod: 0.3 drop rate, higher chance of multiple catches
},
['titanium_rod'] = {
drop = 0.4, -- Titanium Rod: 0.4 drop rate, highest chance of catching multiple fish
}
}
Setting Up NPCs, Fishing Zones, and Shop Items in the Fishing Script
This title reflects the configuration of various elements, like NPC models, fishing zones, and the shopping options, providing clarity for users diving into specific settings.
Config = {
ped = { -- Configuration for NPCs in fishing areas
['sea'] = {
key = 'sea', -- Unique identifier for this NPC type
model = `s_m_m_cntrybar_01`, -- NPC model type
account = 'money', -- Account type used for transactions with this NPC
blip = { -- Blip settings for map display
name = 'Fishing Store', -- Blip name displayed on the map
sprite = 356, -- Blip icon
color = 74, -- Blip color code
scale = 0.75 -- Blip scale size
},
locations = { -- Locations for spawning the Fishing Store NPC
vector4(-2081.93, 2613.63, 2.08, 110.98),
vector4(-1492.3639, -939.2579, 9.2140, 144.0305)
}
},
},
Zone = { -- Configuration for different fishing zones
-- Coral Reef Zone
{
blip = {
name = 'Coral Reef', -- Zone name displayed on the map
sprite = 317, -- Icon for Coral Reef zone
color = 24, -- Color code for Coral Reef blip
scale = 0.6 -- Scale size for the blip
},
locations = { -- Coordinates for the Coral Reef zone
vector3(-1774.0654, -1796.2740, 0.0),
vector3(2482.8589, -2575.6780, 0.0)
},
radius = 250.0, -- Radius of the zone
minLevel = 1, -- Minimum player level required to fish in this zone
waitTime = { min = 5, max = 10 }, -- Wait time range for catching fish
includeOutside = true, -- Allows fishing outside the main radius
message = {
enter = 'You have entered a coral reef.', -- Entry message
exit = 'You have left the coral reef.' -- Exit message
},
fishList = { -- Types of fish available in Coral Reef
{ name = 'mahi_mahi', price = 1500 },
{ name = 'red_snapper', price = 1750 }
}
},
-- Deep Waters Zone
{
blip = {
name = 'Deep Waters', -- Zone name displayed on the map
sprite = 317,
color = 29,
scale = 0.6
},
locations = {
vector3(-4941.7964, -2411.9146, 0.0),
},
radius = 1000.0,
minLevel = 3,
waitTime = { min = 20, max = 40 },
includeOutside = false,
message = {
enter = 'You have entered deep waters.',
exit = 'You have left deep waters.'
},
fishList = {
{ name = 'grouper', price = 1300 },
{ name = 'tuna', price = 1800 },
{ name = 'shark', price = 2000 }
}
},
-- Swamp Zone
{
blip = {
name = 'Swamp',
sprite = 317,
color = 56,
scale = 0.6
},
locations = {
vector3(-2188.1182, 2596.9348, 0.0),
},
radius = 200.0,
minLevel = 2,
waitTime = { min = 10, max = 20 },
includeOutside = true,
message = {
enter = 'You have entered a swamp.',
exit = 'You have left the swamp.'
},
fishList = {
{ name = 'grouper', price = 1300 },
{ name = 'tuna', price = 3800 },
{ name = 'shark', price = 7000 },
{ name = 'mahi_mahi', price = 1500 },
{ name = 'haddock', price = 4500 },
{ name = 'salmon', price = 1500 },
}
}
},
outside = { -- Configuration for fishing outside designated zones
waitTime = { min = 15, max = 25 }, -- Wait time range outside zones
fishList = { -- Available fish outside designated zones
{ name = 'grouper', price = 1300 },
{ name = 'tuna', price = 3800 },
{ name = 'shark', price = 7000 },
{ name = 'mahi_mahi', price = 1500 },
{ name = 'haddock', price = 4500 },
{ name = 'salmon', price = 1500 },
},
message = {
enter = 'You are now fishing outside special zones.',
exit = 'You have stopped fishing outside special zones.'
}
},
shopping = { -- Shop configuration for rods and baits
-- Silver Rod
{
id = 7,
name = "SILVER ROD", -- Display name for the item
description = "A basic rod for casual fishing.", -- Description of the item
price = 100000, -- Item price
quantity = 1, -- Default quantity
image = "./assets/img/item/basic_rod.png", -- Path to item image
model = 'basic_rod', -- Model used in gameplay
},
-- Piranha Bait
{
id = 1,
name = "PIRANHA BAIT",
description = "A rare bait known to attract piranhas.",
price = 100000000,
quantity = 1,
image = "./assets/img/item/piranha.png",
model = 'piranha',
},
-- Shark Bait
{
id = 2,
name = "SHARK BAIT",
description = "Special bait used for attracting sharks.",
price = 100000,
quantity = 1,
image = "./assets/img/item/shark.png",
model = 'shark',
},
-- Other baits with similar structure...
}
}
Rank Update Command - Level Command Documentation
This command allows administrators to set or update a player’s rank in the game, managing player ranks by updating a JSON file (playerlist.json) where player information is stored. Only admins can use this command, and if a non-admin attempts to execute it, they will receive an error message.
Command Usage:
Syntax:/level [newRank]
Arguments:newRank (Numeric value representing the player's new rank)
Access: Admin Only
Purpose: Sets or updates a player's rank, storing the new rank in playerlist.json
Process Overview:
Admin Validation:
The command checks if the player is an admin using notAdmin(source).
If they are not an admin, they will see: Error: You are not an admin. and the command stops here.
Data Retrieval:
If the user is an admin, their data is retrieved based on the framework (ESX, NewESX, QBCore).
Rank Update:
If the player exists in playerlist.json, their rank is updated.
If not, the player's data (rank, avatar, title, etc.) is added to the file.
Data Save:
Updated data is saved to playerlist.json. If the save is successful, the player receives: Rank Update: Your rank has been set to [newRank]
Error Handling:
Save Error: If data fails to save, the console logs Failed to save updated data to playerlist.json
Identifier Issue: If no identifier is found, the console warns Warning: No identifier found for player.
Data Retrieval Failure: If player data retrieval fails, the console logs Could not retrieve player data for player ID: [playerId]
Invalid Input: If the rank or player ID is invalid, the command logs Invalid rank or player ID.
This command allows for efficient, secure rank management while ensuring only admins can make rank updates.