Configuration
This article guides you through the usage of the sYn_Fishing script.
1. Positions.
Here you find all settings related to positions.
['fishingspot1'] = {
['coords'] = {-1859.6151, -1242.0690, 8.6158},
['distance'] = 5.0,
['marker'] = {
['enable'] = true,
['rotate'] = true,
['marker'] = 21,
['drawDistance'] = 25.0,
['size'] = {
x = 1.0,
y= 1.0,
z= 1.0
},
['color'] = {
r = 105,
g = 0,
b = 234,
t = 155
}
}
},
['fishingspot2'] = {
['coords'] = {-1825.1138, -1267.4740, 8.6183},
['distance'] = 15.0,
['marker'] = {
['enable'] = true,
['rotate'] = true,
['marker'] = 21,
['drawDistance'] = 25.0,
['size'] = {
x = 1.0,
y= 1.0,
z= 1.0
},
['color'] = {
r = 255,
g = 0,
b = 0,
t = 155
}
}
}, -- add here more spots
sYn.Blips = {
["Shop"] = {
sprite = 317, -- Blip sprite. [https://docs.fivem.net/docs/game-references/blips/]
scale = 0.9, -- Blip scale. [0.1 - ∞]
color = 3, -- Blip color. [https://docs.fivem.net/docs/game-references/blips/#blip-colors]
display = 4, -- Display the Blip.
text = "Selling fish" -- Blip name.
},
["Spots"] = {
sprite = 762, -- Blip sprite. [https://docs.fivem.net/docs/game-references/blips/]
scale = 0.9, -- Blip scale. [0.1 - ∞]
color = 3, -- Blip color. [https://docs.fivem.net/docs/game-references/blips/#blip-colors]
display = 4, -- Display the Blip.
text = "Fishing area" -- Blip name.
}
}
['Shop'] = vector4(-1040.2983, -1396.7104, 4.5532, 75.7789) -- At which coordinates should the shop be accessible?
2. Notifications / UI Texts.
Here you'll find all settings related to notifications. (You'll also find all main texts of the UI here.)
sYn.notifications = { -- Notification
['startFishing'] = "Press E to fish",
['cancelFishing'] = "Press E to cancel fishing",
['fishingStarting'] = "You are now fishing. Good luck!",
['fishingStop'] = "You have stopped fishing, i hope you caught a lot!",
['openShop'] = "Press E to sell your fish",
['pressKey'] = "Press %s to catch a fish",
['noRod'] = "You have no fishing rod",
['noBait'] = "You have no fishbait",
['countdown'] = "You cannot fish at the moment",
['fishingNotify'] = "You caught %sx %s",
['fishingFailed'] = "You caught nothing",
['notEnoughItems'] = "You need %sx %s to sell",
['brokenRod'] = "Your fishing rod has broken",
['sell'] = "You sold %sx %s for %s$",
['shopCountdown'] = "You cannot sell anything at the moment",
['fishingBoostActive'] = "The fishing boost is now active until %s:%s am",
['fishingBoostDeactivated'] = "The fishing boost is now deavtivated",
['alreadyHaveWeapon'] = "You already have this weapon in your inventory"
}
sYn.Texts = { -- UI
['title'] = "Selling fish",
['sell'] = "Sell"
}
function Notify(type, msg)
local title = ""
if type == 'success' then
title = 'sYn ✘ Fishing'
elseif type == 'info' then
title = 'sYn ✘ Fishing'
elseif type == 'error' then
title = 'sYn ✘ Fishing'
else
title = 'sYn ✘ Fishing'
end
TriggerEvent('sYn_notify', type, title, msg)
end
function Announce(msg)
TriggerEvent('sYn_announce', 'Boost', msg)
end
function HelpNotify(message) -- Your Helpnotify Trigger.
exports['sYn_helpnotify']:ShowHelpNotify(message, "E")
end
3. Main settings.
Here are all the main settings of this script.
sYn.Settings = {
['getSharedObject'] = "newESX", -- use newESX or oldESX
['Drawdistance'] = 10.0, -- The distance from which you can see the selling NPC.
['delay'] = 2, -- in sec // Calculates the duration of fishing
['Countdown'] = 5, -- in sec // Prevents immediate fishing after stopping
['RodDurability'] = {
useRodDurability = true, -- Do you want to use rod durability?
Durability = 10 -- Each catch decreases durability by 10 (max durability of rods are 100)
},
['useBoostAnnounce'] = true, -- Do you want to use the boost announce?
}
sYn.FishingBoost = {
['enabled'] = true,-- Do you want to use the fishing boost?
['from'] = { -- Set the start time for the fishing boost.
hour = 01,
min = 44
},
['to'] = { -- Set the end time for the fishing boost.
hour = 01,
min = 45
},
['multiplier'] = 5 -- Set how much Items the Player receive.
}
sYn.FishingFailedProbability = 5 -- Here, you can set how often the player should receive nothing. The lower the value, the less this function is triggered. If you set the value high, the player will receive nothing more often
sYn.FishingItems = { -- Setup your Items people can get while fishing, set the fishing reward.
['fish'] = { -- Itemname.
label = 'Fish', -- Labelname.
minReward = 1, -- Set the minimum (1) reward.
maxReward = 3, -- Set the maximum (∞) reward.
probability = 95, -- Set the probability 1-100.
isWeapon = false -- Set it to false if it is a Item and true if weapon.
},
['salmon'] = {
label = 'Salmon',
minReward = 1,
maxReward = 3,
probability = 75,
isWeapon = false
},
['trout'] = {
label = 'Trout',
minReward = 1,
maxReward = 3,
probability = 65,
isWeapon = false
},
['pike'] = {
label = 'Pike',
minReward = 1,
maxReward = 3,
probability = 55,
isWeapon = false
},
['perch'] = {
label = 'Perch',
minReward = 1,
maxReward = 3,
probability = 45,
isWeapon = false
},
['zander'] = {
label = 'Zander',
minReward = 1,
maxReward = 3,
probability = 35,
isWeapon = false
},
['turtle'] = {
label = 'Turtle',
minReward = 1,
maxReward = 2,
probability = 25,
isWeapon = false
},
['shark'] = {
label = 'Shark',
minReward = 1,
maxReward = 2,
probability = 15,
isWeapon = false
},
['WEAPON_PISTOL'] = {
label = 'Pistol',
minReward = 1,
maxReward = 1,
probability = 1, -- This is very, very rare.
isWeapon = true
} -- add more here
}
sYn.SellItems = { -- Setup your Items people can sell.
["fish"] = { -- Itemname.
label = "Fish", -- Labelname.
price = 55 -- Setup the amount people receive when selling the Item.
},
["turtle"] = {
label = "Turtle",
price = 65
},
["hai"] = {
label = "Hai",
price = 75
}
}
INSERT INTO items (name, label, weight, rare, can_remove) -- Name of the items SQL table where the items get added.
('fishbait', 'Köter', 1, 0, 1),
('fishingrod', 'Angel', 1, 1, 0),
('turtle', 'Schildkröte', 1, 0, 1),
('hai', 'Hai', 1, 0, 1)
;
4. Discord logs.
Here are all the configuration options for the Discord logs.
sYn.Webhook = {
['enabled'] = true,
['webhookFarming'] = "https://discord.com/api/webhooks/1196251286522302524/DFcba8Ox8PJEU1SuAW51CA0Fw65T8Kznk0JhEIaHOV-gGs9hjvWR3XoME4xmhtDxwhGm",
['webhookSell'] = "https://discord.com/api/webhooks/1202030533555527750/QzTYpRqm1C_QsKhUU2XsqIRqKTFL06UUh27dliWjJ2sks2zS2Cz6Isxu95UUThAx_qqu",
['name'] = "sYn Fishing",
['color'] = 6900730,
['picture'] = "https://media.discordapp.net/attachments/1185559269186220032/1185559321359171654/AI.png",
['message'] = {
received = "Player **%s** caught **%sx %s**",
receivedNothing = "The player **%s** caught nothing",
sell = "**%s** sold **%sx** **%s** for **%s**$"
}
}
Last updated