đConfigurables
In this page, you can see everything that can be configured/changed within this script.
Config files
--[[
BY RX Scripts Š rxscripts.xyz
--]]
--[[
FISHING ZONES CAN BE FOUND IN config/zones.lua
FISHES CAN BE FOUND IN config/fishes.lua
FISHING RODS CAN BE FOUND IN config/rods.lua
LEVELS CAN BE FOUND IN config/levels.lua
BAITS & NETS CAN BE FOUND IN config/usables.lua
MISSIONS CAN BE FOUND IN config/missions.lua
TRANSLATIONS CAN BE FOUND IN locales/*.lua
IN HERE YOU CAN FIND THE MORE GENERIC / NOT VERY LONG LISTS CONFIGURATIONS
--]]
Config = {}
Config.SaveInterval = 10 -- Minutes (Set to 'false' to disable saving on interval, only on server shutdown, or important reached levels)
Config.DiscordWebhook = '' -- Discord webhook to send important logs (Set to '' to disable)
Config.Locale = 'en'
Config.ImgDirectory = 'ox_inventory/web/images/' -- The directory where the images are stored.
Config.AnchorBoats = {
enabled = true,
keybind = 'B',
}
Config.FishingLicense = {
enabled = true, -- Set to false to disable the whole fishing license
buyable = true, -- Set to false to disable buying the license, use exports to give the license to a player
price = 1500,
moneyType = 'bank',
restricts = {
catching = true, -- If true, catching a fishing without a license will notify the police and catching will give no benefits
shopNPC = true, -- If true, you need a fishing license to open the shop NPC
sellNPC = true, -- If true, you need a fishing license to open the sell NPC
fishingNPC = true, -- If true, you need a fishing license to open the fishing NPC
boatRenting = true, -- If true, you need a fishing license to rent a boat
},
}
Config.FishingNPC = { -- NPC to buy fishing license (if enabled) & see routes, level etc..
enabled = true, -- Set to false to disable the fishing NPC
coords = vector3(1317.1320, 4304.3735, 37.0333),
heading = 49.1477,
model = 'a_m_m_hillbilly_01',
blip = {
enabled = true,
sprite = 68,
color = 3,
label = 'Fisherman',
display = 2,
scale = 0.7,
shortrange = true,
},
}
Config.ShopNPC = { -- NPC that opens a shop
enabled = true, -- Set to false to disable the shop npc
route = true, -- If true, the shop NPC will have a route in the fishing npc
label = 'Fishing Shop',
moneyType = 'bank',
model = 'a_m_m_hillbilly_01',
coords = vector3(1429.5470, 4377.7417, 43.5993),
heading = 48.8148,
blip = {
enabled = true,
sprite = 68,
color = 3,
display = 2,
scale = 0.7,
shortrange = true,
},
categories = {
['Rods'] = {
{ item = 'spinning_rod', amount = 1, price = 2500, label = 'Spinning Rod', requiredLevel = 0, mystery = false },
{ item = 'spincast_rod', amount = 1, price = 1500, label = 'Spincast Rod', requiredLevel = 1, mystery = false },
{ item = 'baitcast_rod', amount = 1, price = 5000, label = 'Baitcast Rod', requiredLevel = 2, mystery = true },
},
['Baits'] = {
{ item = 'worms', amount = 10, price = 2500, label = 'Worms', requiredLevel = 0, mystery = false },
},
['Nets'] = {
{ item = 'net_sm', amount = 1, price = 5000, label = 'Fishing Net (Small)', requiredLevel = 0, mystery = false },
{ item = 'net_md', amount = 1, price = 10000, label = 'Fishing Net (Medium)', requiredLevel = 1, mystery = false },
{ item = 'net_xl', amount = 1, price = 15000, label = 'Fishing Net (XL)', requiredLevel = 2, mystery = true },
},
},
}
Config.SellNPC = { -- NPC that opens a shop to sell fishing stuff
enabled = true, -- Set to false to disable the selling shop npc
route = true, -- If true, the sell NPC will have a route in the fishing npc
label = 'Fish Selling',
moneyType = 'bank',
model = 'a_m_m_hillbilly_01',
coords = vector3(1381.5995, 4381.9585, 44.1885),
heading = 188.0122,
blip = {
enabled = true,
sprite = 68,
color = 3,
display = 2,
scale = 0.7,
shortrange = true,
},
categories = { -- Price is per 1
['Fishes'] = {
{ item = 'pike', price = 250, label = 'Pike', requiredLevel = 0, mystery = false },
{ item = 'carp', price = 250, label = 'Carp', requiredLevel = 0, mystery = false },
{ item = 'piranha', price = 500, label = 'Piranha', requiredLevel = 1, mystery = false },
{ item = 'salmon', price = 1000, label = 'Salmon', requiredLevel = 2, mystery = false },
{ item = 'shark', price = 5000, label = 'Shark', requiredLevel = 3, mystery = true },
},
},
}
Config.BoatRentals = { -- Boat rentals (clear table to disable)
['Lake Boats'] = {
model = 'a_m_m_hillbilly_01',
locations = {
{
coords = vector3(1302.5350, 4226.8096, 32.9079),
heading = 90.5534,
spawnCoords = vector4(1317.1467, 4217.6895, 29.6056, 254.5664),
returnCoords = vector3(1305.8408, 4217.5796, 29.7579)
},
},
moneyType = 'bank',
boats = {
{ model = 'speeder', label = 'Speeder', rentInterval = 30, intervalPrice = 1500, deposit = 10000, requiredLevel = 0, mystery = false },
{ model = 'dinghy', label = 'Dinghy', rentInterval = 30, intervalPrice = 2500, deposit = 10000, requiredLevel = 1, mystery = false },
},
blip = {
enabled = true,
sprite = 68,
color = 3,
display = 2,
scale = 0.7,
shortrange = true,
},
},
['Sea Boats'] = {
model = 'a_m_m_hillbilly_01',
locations = {
{
coords = vector3(-753.3140, -1510.9105, 4.0118),
heading = 0.5534,
spawnCoords = vector4(-793.1320, -1516.2852, -0.6457, 114.4813),
returnCoords = vector3(-799.6685, -1487.3918, -0.5698)
},
{
coords = vector3(23.9022, -2804.3582, 4.7018),
heading = 353.9784,
spawnCoords = vector4(36.3151, -2810.0308, 0.1431, 174.8118),
returnCoords = vector3(57.3152, -2804.7424, -0.0486)
},
{
coords = vector3(3865.6052, 4463.6816, 1.7162),
heading = 96.9204,
spawnCoords = vector4(3880.2327, 4480.1450, -0.4719, 268.6510),
returnCoords = vector3(3876.4958, 4444.5576, -0.4764)
},
},
moneyType = 'bank',
boats = {
{ model = 'speeder', label = 'Speeder', rentInterval = 30, intervalPrice = 1500, deposit = 10000, requiredLevel = 0, mystery = false },
{ model = 'dinghy', label = 'Dinghy', rentInterval = 30, intervalPrice = 2500, deposit = 10000, requiredLevel = 1, mystery = false },
{
model = 'tug', -- Boat model
label = 'Tug', -- Boat label
rentInterval = 30, -- In minutes, every rentInterval minutes, the player will be charged the intervalPrice
intervalPrice = 5000, -- Price per interval
deposit = 10000, -- Deposit to rent the boat, will be returned when the boat is returned
requiredLevel = 2, -- Required fishing level to rent the boat
mystery = true, -- If true, the boat will be a mystery boat when not unlocked
},
},
blip = {
enabled = true,
sprite = 68,
color = 3,
display = 2,
scale = 0.7,
shortrange = true,
},
},
}
--[[
ONLY CHANGE THIS PART IF YOU HAVE RENAMED SCRIPTS SUCH AS FRAMEWORK, TARGET, INVENTORY ETC
RENAME THE SCRIPT NAME TO THE NEW NAME
--]]
---@type table Only change these if you have changed the name of a resource
Resources = {
FM = { name = 'fmLib', export = 'new' },
OXTarget = { name = 'ox_target', export = 'all' },
QBTarget = { name = 'qb-target', export = 'all' },
}
IgnoreScriptFoundLogs = false
--[[
BY RX Scripts Š rxscripts.xyz
--]]
Config.Fishes = {
['Carp'] = { -- Must be unique
item = 'carp',
findChance = 30, -- Recommended to keep between 1 - 100 (individual chance, no need to sum all fishes up to 100)
requiredLevel = 0, -- Required level to find the fish
xp = {
catchGain = 5, -- XP gained from catching the fish
},
difficulty = { -- Difficulty for catching the fish through the minigame
fishSpeed = 2000,
fishJumpRange = 50,
catchTime = { min = 30, max = 60 }, -- Random time in seconds to finish the catching minigame, otherwise fails
}
},
['Pike'] = { -- Must be unique
item = 'pike',
findChance = 30, -- Recommended to keep between 1 - 100 (individual chance, no need to sum all fishes up to 100)
requiredLevel = 0, -- Required level to find the fish
xp = {
catchGain = 5, -- XP gained from catching the fish
},
difficulty = { -- Difficulty for catching the fish through the minigame
fishSpeed = 2000,
fishJumpRange = 50,
catchTime = { min = 30, max = 60 }, -- Random time in seconds to finish the catching minigame, otherwise fails
}
},
['Piranha'] = { -- Must be unique
item = 'piranha',
findChance = 20, -- Recommended to keep between 1 - 100 (individual chance, no need to sum all fishes up to 100)
requiredLevel = 1, -- Required level to find the fish
xp = {
catchGain = 10, -- XP gained from catching the fish
},
difficulty = { -- Difficulty for catching the fish through the minigame
fishSpeed = 1500,
fishJumpRange = 70,
catchTime = { min = 30, max = 60 }, -- Random time in seconds to finish the catching minigame, otherwise fails
}
},
['Salmon'] = { -- Must be unique
item = 'salmon',
findChance = 10, -- Recommended to keep between 1 - 100 (individual chance, no need to sum all fishes up to 100)
requiredLevel = 2, -- Required level to find the fish
xp = {
catchGain = 20, -- XP gained from catching the fish
},
difficulty = { -- Difficulty for catching the fish through the minigame
fishSpeed = 1000,
fishJumpRange = 80,
catchTime = { min = 30, max = 60 }, -- Random time in seconds to finish the catching minigame, otherwise fails
}
},
['Shark'] = { -- Must be unique
item = 'shark',
findChance = 3, -- Recommended to keep between 1 - 100 (individual chance, no need to sum all fishes up to 100)
requiredLevel = 3, -- Required level to find the fish
xp = {
catchGain = 50, -- XP gained from catching the fish
},
difficulty = { -- Difficulty for catching the fish through the minigame
fishSpeed = 500,
fishJumpRange = 100,
catchTime = { min = 30, max = 60 }, -- Random time in seconds to finish the catching minigame, otherwise fails
}
},
}
--[[
BY RX Scripts Š rxscripts.xyz
--]]
Config.FishingRods = {
['Spinning Rod'] = { -- Must be unique
item = 'spinning_rod', -- Item name
requiredLevel = 0, -- Required level to use the rod
breakChance = 30, -- Chance to break the rod on failed catch
difficulty = { -- Difficulty for catching the fish through the minigame
reelPower = 5,
progressPenalty = 3,
progressIncrement = 2,
baitSpeed = 2000,
},
multipliers = {
xpGain = 1.0, -- 0% more xp on catching (1.0 is 100%)
}
},
['Spincast Rod'] = { -- Must be unique
item = 'spincast_rod', -- Item name
requiredLevel = 1, -- Required level to use the rod
breakChance = 20, -- Chance to break the rod on failed catch
difficulty = { -- Difficulty for catching the fish through the minigame
reelPower = 7,
progressPenalty = 4,
progressIncrement = 3,
baitSpeed = 1500,
},
multipliers = {
xpGain = 1.1, -- 0% more xp on catching (1.0 is 100%)
}
},
['Baitcast Rod'] = { -- Must be unique
item = 'baitcast_rod', -- Item name
requiredLevel = 3, -- Required level to use the rod
breakChance = 10, -- Chance to break the rod on failed catch
difficulty = { -- Difficulty for catching the fish through the minigame
reelPower = 10,
progressPenalty = 5,
progressIncrement = 4,
baitSpeed = 1000,
},
multipliers = {
xpGain = 1.3, -- 0% more xp on catching (1.0 is 100%)
}
},
}
--[[
BY RX Scripts Š rxscripts.xyz
--]]
Config.Baits = {
['worms'] = { -- Item name of the bait
requiredLevel = 0, -- Required level to use this bait
attractTime = { min = 5, max = 30 }, -- Random time in seconds the bait will attract fishes
attracts = { -- Fishes that will be attracted by this bait (key from config/fishes.lua)
'Carp',
'Pike',
'Piranha',
'Salmon',
'Shark',
}
},
}
Config.MaximumNets = 3 -- Maximum nets that can be laying down at the same time per player
Config.MinDistanceNets = 50 -- Minimum required distance between nets
Config.Nets = { -- Nets to throw in zones to catch fish living in that specific zone over time
['net_sm'] = { -- Item name to use the net
label = 'Fishing Net (Small)', -- Label of the net
requiredLevel = 0, -- Required level to use this net
catchTime = { min = 5, max = 10 }, -- Random time in minutes to catch 1 fish (based on the spawnChance of a fish)
maximumFish = 20, -- Maximum fish that can be caught by the net
xp = {
throwGain = 10, -- XP gained from throwing the net
catchGain = 1, -- XP gained from 1 fish caught by the net or -1 to use the fish xp
returnGain = 10, -- XP gained from returning the net
},
allowedZones = { -- Zones where this net can be thrown (key from config/zones.lua)
'Lake',
},
allowedBoats = { -- Boat models where this net can be thrown & returned
'speeder',
'dinghy',
'tug',
},
blip = { -- Blip that will be shown on the map when thrown for the player
enabled = true,
sprite = 68,
color = 24,
display = 2,
scale = 0.7,
shortrange = true,
},
},
['net_md'] = { -- Item name to use the net
label = 'Fishing Net (Medium)', -- Label of the net
requiredLevel = 1, -- Required level to use this net
catchTime = { min = 5, max = 10 }, -- Random time in minutes to catch 1 fish (based on the spawnChance of a fish)
maximumFish = 30, -- Maximum fish that can be caught by the net
xp = {
throwGain = 10, -- XP gained from throwing the net
catchGain = 1, -- XP gained from 1 fish caught by the net or -1 to use the fish xp
returnGain = 10, -- XP gained from returning the net
},
allowedZones = { -- Zones where this net can be thrown (key from config/zones.lua)
'Lake',
'Deep Sea',
},
allowedBoats = { -- Boat models where this net can be thrown & returned
'speeder',
'tug',
},
blip = { -- Blip that will be shown on the map when thrown for the player
enabled = true,
sprite = 68,
color = 24,
display = 2,
scale = 0.7,
shortrange = true,
},
},
['net_xl'] = { -- Item name to use the net
label = 'Fishing Net (XL)', -- Label of the net
requiredLevel = 2, -- Required level to use this net
catchTime = { min = 5, max = 10 }, -- Random time in minutes to catch 1 fish (based on the spawnChance of a fish)
maximumFish = 50, -- Maximum fish that can be caught by the net
xp = {
throwGain = 10, -- XP gained from throwing the net
catchGain = 1, -- XP gained from 1 fish caught by the net or -1 to use the fish xp
returnGain = 10, -- XP gained from returning the net
},
allowedZones = { -- Zones where this net can be thrown (key from config/zones.lua)
'Deep Sea',
},
allowedBoats = { -- Boat models where this net can be thrown & returned
'tug',
},
blip = { -- Blip that will be shown on the map when thrown for the player
enabled = true,
sprite = 68,
color = 24,
display = 2,
scale = 0.7,
shortrange = true,
},
}
}
--[[
BY RX Scripts Š rxscripts.xyz
--]]
Config.FishingZones = {
['Lake'] = {
requiredLevel = 0, -- Required level to fish in these zones
zones = {
{
type = 'sphere',
coords = vector3(366.6110, 3929.9873, -5.6992),
radius = 250,
debug = false,
route = {
enabled = true,
coords = { x = 366.6110, y = 3929.9873},
},
},
{
type = 'sphere',
coords = vector3(1174.3335, 3960.6455, 31.8587),
radius = 250,
debug = false,
route = {
enabled = true,
coords = { x = 1174.3335, y = 3960.6455},
},
},
{
type = 'sphere',
coords = vector3(2061.5610, 4253.6553, 31.2383),
radius = 250,
debug = false,
route = {
enabled = true,
coords = { x = 2061.5610, y = 4253.6553},
},
},
},
fishes = {
'Carp',
'Pike',
'Piranha',
},
route = {
enabled = true,
coords = { x = -1774.0654, y = -1796.2740},
},
blip = {
enabled = true,
sprite = 317,
color = 3,
display = 2,
scale = 0.7,
shortrange = true,
},
radiusBlip = {
enabled = true,
color = 3,
alpha = 80,
shortrange = true,
}
},
['Deep Sea'] = {
requiredLevel = 1, -- Required level to fish in these zones
zones = {
{
type = 'sphere',
coords = vector3(-2731.9763, -1860.8646, -0.7885),
radius = 1000,
debug = false,
route = {
enabled = true,
coords = { x = -2731.9763, y = -1860.8646},
},
},
{
type = 'sphere',
coords = vector3(354.1269, -4476.5508, -0.8757),
radius = 1000,
debug = false,
route = {
enabled = true,
coords = { x = 354.1269, y = -4476.5508},
},
},
{
type = 'sphere',
coords = vector3(5130.1904, 5211.5317, -0.2383),
radius = 1000,
debug = false,
route = {
enabled = true,
coords = { x = 5130.1904, y = 5211.5317},
},
},
},
fishes = {
'Carp',
'Pike',
'Piranha',
'Salmon',
'Shark',
},
blip = {
enabled = true,
sprite = 317,
color = 3,
display = 2,
scale = 0.7,
shortrange = true,
},
radiusBlip = {
enabled = true,
color = 3,
alpha = 80,
shortrange = true,
}
}
}
--[[
BY RX Scripts Š rxscripts.xyz
--]]
Config.MaxMissions = 6 -- Max amount of missions that can be active at the same time (make sure its 1 less than the amount of missions in the table below so it can rotate)
Config.Missions = {
-- Catch Missions
["Catch 20x Pike"] = {
endTime = 12, -- Time in hours to complete the mission (after this a random other mission will start)
type = 'catch', -- 'catch' or 'netCatch'
amount = 20, -- Amount of catches required
fish = 'Pike', -- Fish to catches (key from config/fishes.lua)
rewards = {
xp = 50, -- Set to 0 to disable
money = 1000, -- Set to 0 to disable
moneyType = 'bank',
items = { -- Empty table to disable
}
}
},
["Catch 15x Piranha"] = {
endTime = 24, -- Time in hours to complete the mission (after this a random other mission will start)
type = 'catch', -- 'catch' or 'netCatch'
amount = 15, -- Amount of catches required
fish = 'Piranha', -- Fish to catches (key from config/fishes.lua)
rewards = {
xp = 100, -- Set to 0 to disable
money = 2000, -- Set to 0 to disable
moneyType = 'bank',
items = { -- Empty table to disable
{ item = 'worms', amount = 20 },
}
}
},
["Catch 10x Salmon"] = {
endTime = 48, -- Time in hours to complete the mission (after this a random other mission will start)
type = 'catch', -- 'catch' or 'netCatch'
amount = 15, -- Amount of catches required
fish = 'Salmon', -- Fish to catches (key from config/fishes.lua)
rewards = {
xp = 200, -- Set to 0 to disable
money = 5000, -- Set to 0 to disable
moneyType = 'bank',
items = { -- Empty table to disable
{ item = 'worms', amount = 30 },
}
}
},
["Catch 5x Shark"] = {
endTime = 72, -- Time in hours to complete the mission (after this a random other mission will start)
type = 'catch', -- 'catch' or 'netCatch'
amount = 5, -- Amount of catches required
fish = 'Shark', -- Fish to catches (key from config/fishes.lua)
rewards = {
xp = 300, -- Set to 0 to disable
money = 5000, -- Set to 0 to disable
moneyType = 'bank',
items = { -- Empty table to disable
{ item = 'worms', amount = 50 },
}
}
},
-- Net Missions
["Catch 5x Pike with Net"] = {
endTime = 24, -- Time in hours to complete the mission (after this a random other mission will start)
type = 'netCatch', -- 'catch' or 'netCatch'
amount = 5, -- Amount of throws required
fish = 'pike', -- Fish to catches (key from config/fishes.lua)
rewards = {
xp = 300, -- Set to 0 to disable
money = 5000, -- Set to 0 to disable
moneyType = 'bank',
items = { -- Empty table to disable
{ item = 'worms', amount = 50 },
}
}
},
}
--[[
BY RX Scripts Š rxscripts.xyz
--]]
Config.Levels = { -- Levels must be incremental by 1, starting from 1
-- level 0 is the default starter level everyone has
[1] = 100, -- 100 xp needed to reach level 1
[2] = 350,
[3] = 650,
[4] = 1100,
[5] = 1900,
[6] = 2800,
[7] = 4000,
}
Opensource files
--[[
BY RX Scripts Š rxscripts.xyz
--]]
function ShowTextUI(text, opts)
lib.showTextUI(text, opts)
end
function HideTextUI()
lib.hideTextUI()
end
function AddFishingNPCTarget(ped)
if OXTarget then
OXTarget:addLocalEntity(ped, {
{
label = 'Open Fisherman',
name = 'openFishingNPC',
icon = 'fas fa-fish',
distance = 2.5,
onSelect = function(data)
OpenFishingUI()
end,
}
})
elseif QBTarget then
QBTarget:AddTargetEntity(ped, {
options = {
{
label = 'Open Fisherman',
icon = 'fas fa-fish',
targeticon = 'fas fa-fish',
action = function(entity)
OpenFishingUI()
end,
}
},
distance = 2.5,
})
end
end
function AddShopNPCTarget(npc)
if OXTarget then
OXTarget:addLocalEntity(npc, {
{
label = 'Open Fishing Shop',
name = 'openFishingShop',
icon = 'fas fa-shopping-cart',
distance = 2.5,
onSelect = function(data)
OpenShopNPC()
end,
}
})
elseif QBTarget then
QBTarget:AddTargetEntity(npc, {
options = {
{
label = 'Open Fishing Shop',
icon = 'fas fa-shopping-cart',
targeticon = 'fas fa-shopping-cart',
action = function(entity)
OpenShopNPC()
end,
}
},
distance = 2.5,
})
end
end
function AddSellNPCTarget(npc)
if OXTarget then
OXTarget:addLocalEntity(npc, {
{
label = 'Open Fishing Selling',
name = 'openFishingSelling',
icon = 'fas fa-shopping-cart',
distance = 2.5,
onSelect = function(data)
OpenSellNPC()
end,
}
})
elseif QBTarget then
QBTarget:AddTargetEntity(npc, {
options = {
{
label = 'Open Fishing Selling',
icon = 'fas fa-shopping-cart',
targeticon = 'fas fa-shopping-cart',
action = function(entity)
OpenSellNPC()
end,
}
},
distance = 2.5,
})
end
end
function AddBoatRentalNPCTarget(npc, rentalName, locIndex)
if OXTarget then
OXTarget:addLocalEntity(npc, {
{
label = 'Open '..rentalName,
name = 'openBoatRental',
icon = 'fas fa-ship',
distance = 2.5,
onSelect = function(data)
OpenBoatRental(rentalName, locIndex)
end,
}
})
elseif QBTarget then
QBTarget:AddTargetEntity(npc, {
options = {
{
label = 'Open '..rentalName,
icon = 'fas fa-ship',
targeticon = 'fas fa-ship',
action = function(entity)
OpenBoatRental(rentalName, locIndex)
end,
}
},
distance = 2.5,
})
end
end
function RemoveShopNPCTarget(ped)
if OXTarget then
OXTarget:removeLocalEntity(ped, 'openFishingShop')
elseif QBTarget then
QBTarget:RemoveTargetEntity(ped, 'Open Fishing Shop')
end
end
function RemoveSellNPCTarget(ped)
if OXTarget then
OXTarget:removeLocalEntity(ped, 'openFishingSelling')
elseif QBTarget then
QBTarget:RemoveTargetEntity(ped, 'Open Fishing Selling')
end
end
function RemoveTarget(ent, name)
if OXTarget then
OXTarget:removeLocalEntity(ent, name)
elseif QBTarget then
QBTarget:RemoveTargetEntity(ent, name)
end
end
function GetPlacingBaitCoords()
local coords = GetEntityCoords(PlayerPedId())
local forward = GetEntityForwardVector(PlayerPedId())
coords = coords + forward
local ret, z = GetGroundZFor_3dCoord(coords.x, coords.y, coords.z, 0, false)
coords = vector3(coords.x, coords.y, z)
local heading = GetEntityHeading(PlayerPedId())
return coords, heading
end
function PlayPlaceBaitAnim()
FM.anim.play({
anim = 'base',
dict = 'amb@world_human_gardener_plant@male@base',
duration = 3000,
})
end
function GetItemsAmounts()
return FM.callback.sync('fishing:getItemsAmounts')
end
function StartFishingMinigame(reelPower, progressPenalty, progressIncrement, baitSpeed, fishSpeed, fishJumpRange, catchTime, baitName, fishName)
local res = promise.new()
SetNuiFocus(true, true)
SendReactMessage('startFishing', {
reelPower = reelPower,
progressPenalty = progressPenalty,
progressIncrement = progressIncrement,
baitSpeed = baitSpeed,
fishSpeed = fishSpeed,
fishJumpRange = fishJumpRange,
catchTime = catchTime,
baitName = baitName,
fishName = fishName,
})
return res
end
---@param type 'returnBoat' | 'returnNet'
function ShowMarker(type, coords)
if type == 'returnBoat' then
DrawMarker(35, coords, 0, 0, 0, 0, 0, 0, 3.0, 3.0, 3.0, 255, 100, 100, 100, false, true, 2, false, false, false, false)
elseif type == 'returnNet' then
DrawMarker(32, coords, 0, 0, 0, 0, 0, 0, 3.0, 3.0, 3.0, 100, 100, 255, 100, true, true, 2, false, false, false, false)
end
end
function ShowHelpNotification(msg, thisFrame, beep, duration)
AddTextEntry('helpNotification', msg)
if thisFrame then
DisplayHelpTextThisFrame('helpNotification', false)
else
if beep == nil then
beep = true
end
BeginTextCommandDisplayHelp('helpNotification')
EndTextCommandDisplayHelp(0, false, beep, duration or -1)
end
end
local function notifyPolice(coords, msg)
local blip = AddBlipForCoord(coords.x, coords.y, coords.z)
SetBlipSprite(blip, 161)
SetBlipScale(blip, 1.0)
SetBlipColour(blip, 1)
SetBlipAsShortRange(blip, false)
BeginTextCommandSetBlipName("STRING")
AddTextComponentString(_L('blip_suspicious_fishing_activity'))
EndTextCommandSetBlipName(blip)
FM.utils.notify(msg, 'error')
Wait(20000)
RemoveBlip(blip)
end
RegisterNetEvent('fishing:notifyPolice', function(coords, msg)
notifyPolice(coords, msg)
end)
--[[
BY RX Scripts Š rxscripts.xyz
--]]
local function getPoliceSources()
local players = FM.utils.getPlayers()
local policeSources = {}
for src, p in pairs(players) do
if p.getJob().name == 'police' then
policeSources[#policeSources+1] = src
end
end
return policeSources
end
function NotifyPolice(coords, msg)
local police = getPoliceSources()
for _, src in pairs(police) do
TriggerClientEvent('fishing:notifyPolice', src, coords, msg)
end
end
function HasFishingLicense(src)
local p = FM.player.get(src)
if not p then return false end
local identifier = p.getIdentifier()
if not Fishers[identifier] then return false end
return Fishers[identifier].license
end
--[[
esx_licenses INTEGRATION FOR CHECKING FISHING LICENSE
UNCOMMENT FUNCTION BELOW
RENAME 'fishing_license_name_here' TO YOUR FISHING LICENSE NAME
REMOVE/COMMENT THE FUNCTION ABOVE: function HasFishingLicense(src) ...... end
]]
-- function HasFishingLicense(src)
-- local hasLicense = promise.new()