☰ All guides
6-fishing
Fishing with AFK mode and a manual mini-game, boat rental with anchor, fish buyer and Discord logs.
Resource folder
six_fishing
01Requirements
- ESX (1.1, 1.2 or Legacy). QB-Core is not supported.
- The reward items in your inventory (by default
fish,dolphin,shark).
02Installation
- 01Sign in to the Cfx Portal with the account you bought with and download the script under Granted Assets.
- 02Unzip the download and move the folder
six_fishinginto theresourcesfolder of your server. Keep the folder name and upload every file, including the hidden.fxap. - 03Create the items from
Config.Fishing.Rewards. With the default config that is the statement below. - 04Open
config_server.luaand enter your Discord webhook for sales, or setenable = false. - 05Add
ensure six_fishingto yourserver.cfg, belowes_extended. - 06Restart the server (or run
refreshand thenensurewith the folder name in the server console).
INSERT INTO items (name, label) VALUES
('fish', 'Fish'),
('dolphin', 'Dolphin'),
('shark', 'Shark'),
('fishingrod', 'Fishing rod');
Good to know
The rod is only needed if you set FishingItem = true. Its item name must match itemRod (default fishingrod). Older downloads ship a file called gps.sql that creates an item named rod instead: use the statement above.
Good to know
ox_inventory: items are not read from the database. Add the item to ox_inventory/data/items.lua instead: ['fish'] = { label = 'Fish', weight = 100 },
03How players use it
- 01Rent a boat at the boat rental (blip on the map) for
RentPrice. - 02Drive to a fishing spot and drop the anchor.
- 03Start fishing: AFK mode catches by itself, manual mode is faster but asks for a number key every time a fish bites.
- 04Sell the catch at the fish buyer.
Key
- E
- Rent a boat, drop and pull the anchor, start AFK fishing, sell fish.
- Q
- Start manual fishing.
- 1 – 9
- Reel in when a fish bites (manual mode). The key is shown on screen and must be pressed within
keyTime. - X
- Stop fishing.
04Configuration
Option
- Config.newESX
truefor ESX Legacy (1.2 and newer),falsefor old ESX 1.1.- Config.Language
"en"or"de".- Config.weight
trueif your inventory works with weight. The script then checks whether the catch still fits.- Fishing.FishingItem / itemRod
true: fishing needs the rod item named initemRod.- Fishing.AFK / afkTime
- Allows AFK fishing and sets the time per catch in milliseconds.
- Fishing.manual / manualTime / keyTime
- Allows manual fishing, time until a fish bites and time to press the key.
- Fishing.BootSpawn / RentPrice
- Spawn name of the rental boat and its price.
- Fishing.Rewards
- What can be caught. Per entry:
item,type(itemorweapon),chanceandmoney(sale price per piece,nil= cannot be sold). - Config.FishingSpots
- Fishing areas with centre and
radius. - Config.BootNPC
- Boat rentals: NPC position, boat spawn point and NPC model.
- Config.FishingBlips
- Name, icon, size and colour of the three blip types.
Good to know
chance is a weight, not a fixed percentage: the script adds up all values and draws from the total. With the default list (80, 15, 5, 5 = 105) a fish comes up in 80 of 105 catches.
›config.luaComplete file · 193 lines
Config = {}
Config.newESX = true -- If ESX Legacy true
Config.Language = "en"
Config.weight = true -- Weight System? Do you use an Inventory with a Weight System then true
Config.Fishing = {
-- Fishing Rod
FishingItem = false, -- Fishing with Item?
itemRod = "fishingrod", -- Item Name Fishingrod
-- Fishing Time and Mode
AFK = true, -- Allow AFK Fishing?
afkTime = math.random(20000, 25000), -- Time in ms for new Catch (AFK)
manual = true, -- Allow Manuel Minigame Fishing
manualTime = math.random(8000, 12000), -- Time in ms for new Catch (Manual)
keyTime = 3500, -- Time to press the right key on your keyboard
-- Boot Rent
BootSpawn = "dinghy2", -- Spawnname of a boat
RentPrice = 100, -- Boat Rent Price
-- Fishing Rewards (Chance always = 100%) - (Types: item, weapon)
Rewards = {
{item = "fish", type = "item", chance = 80, money = 200},
{item = "dolphin", type = "item", chance = 15, money = 2000},
{item = "shark", type = "item", chance = 5, money = 2950},
{item = "WEAPON_SNSPISTOL", type = "weapon", chance = 5, money = nil},
}
}
Config.FishingBlips = {
FishingSpots = {
name = "Angelspot",
sprite = 780,
scale = 0.9,
color = 3,
},
BootNPC = {
name = "Bootsverleih",
sprite = 356,
scale = 0.7,
color = 0,
},
SellNPC = {
name = "Fisch Verkauf",
sprite = 207,
scale = 0.7,
color = 42,
},
}
Config.FishingSpots = {
-- Pier
{x = -1520.39, y = -1762.72, z = 0.43, radius = 50.0},
{x = -1509.70, y = -1928.15, z = 0.02, radius = 50.0},
{x = -1731.52, y = -1865.11, z = 0.12, radius = 50.0},
-- Sandy
{x = 1255.79, y = 3893.81, z = 30.16, radius = 50.0},
{x = 1097.31, y = 3857.29, z = 30.13, radius = 50.0},
{x = 1147.61, y = 4011.04, z = 30.13, radius = 50.0},
-- Plateo
{x = -664.73, y = 6507.14, z = 1.53, radius = 50.0},
{x = -486.45, y = 6603.37, z = 0.22, radius = 50.0},
{x = -660.64, y = 6711.26, z = 0.06, radius = 50.0},
}
Config.BootNPC = {
-- Pier
{
coords = vector4(-1379.0150, -1629.7825, 2.0363, 110.5688),
boatSpawn = vector4(-1466.8554, -1536.6015, -0.3355, 124.5171),
model = "a_m_y_beach_01"
},
-- Sandy
{
coords = vector4(1309.2602, 3686.6982, 32.2747, 38.5688),
boatSpawn = vector4(1285.8696, 3728.2768, 30.2994, 4.9023),
model = "a_m_y_beach_01"
},
-- Plateo
{
coords = vector4(-493.1999, 6432.7993, 2.5793, 51.7328),
boatSpawn = vector4(-531.3797, 6476.8095, -0.4536, 44.4118),
model = "a_m_y_beach_01"
}
}
Config.SellNPC = {
{
coords = vector4(-1855.2198, -1195.3572, 13.0171, 55.5765),
model = "s_m_m_ammucountry"
}
}
function notify(title, message, type)
-- Custom Notify example: TriggerEvent("six_notify", title, message, type, 5000)
-- Basic ESX Notification:
ESX.ShowNotification(message)
end
function server_notify(source, title, message, type)
-- Custom Server Notify example: TriggerClientEvent("six_notify:server", source, title, message, type, 5000)
-- Basic ESX Notification:
TriggerClientEvent("esx:showNotification", source, message)
end
function ShowHelpNotification(msg)
ESX.ShowHelpNotification(msg)
end
Config.Locales = {
['de'] = {
['notify_title'] = 'Angeln',
["rod_throw"] = "Du hast die Angel rausgeworfen",
["rod_missing"] = "Du besitzt keine Angel!",
["catch_notify"] = "Du hast folgendes gefangen: %s",
['inventory_full'] = "Dein Inventar ist voll!",
["boat_buy_title"] = "Boot erworben",
["boat_rent"] = "Drücke ~INPUT_PICKUP~ um ein Boot für %s$ zu kaufen",
["boat_buy"] = "Du hast für den Verkauf von Fischen %s$ erhalten",
["boat_notify"] = "Du hast ein Boot gekauft. Viel Spaß!",
["anchor_title"] = "Anker",
["anchor_drop"] = "Drücke ~INPUT_PICKUP~ um ein Anker zu werfen",
["anchor_pull"] = "Drücke ~INPUT_PICKUP~ um den Anker raus zu holen",
["anchor_notify_drop"] = "Anker wurde ausgeworfen",
["anchor_notify_pull"] = "Anker wurde eingezogen",
["afk_fishing"] = "Drücke ~INPUT_PICKUP~ um ~r~AFK~w~ zu Angeln",
["manuel_fishing"] = "Drücke ~INPUT_COVER~ um ~b~Manual~w~ zu Angeln",
["fishing_cancel"] = "~INPUT_VEH_DUCK~ : ~r~Abbrechen",
["minigame_fish_bites"] = "Etwas hat angebissen, drücke die Taste: %s um die Angel rauszuziehen",
["minigame_false_key"] = "Das war wohl die falsche Taste :(",
["sell_title"] = "Verkauf",
["sell_fish"] = "Drücke ~INPUT_PICKUP~ um deine Fische zu verkaufen",
["not_enough_money"] = "Du hast nicht genug Geld bei dir",
-- Discord Logs
["discord_title"] = "Fisch Verkauf Log",
["discord_sellmessage"] = "Der Spieler %s für **%s**$ Fische verkauft!",
},
['en'] = {
['notify_title'] = 'Fishing',
["rod_throw"] = "You have thrown the fishing rod",
["rod_missing"] = "You don't own a fishing rod!",
["catch_notify"] = "You caught: %s",
['inventory_full'] = "Your inventory is full!",
["boat_buy_title"] = "Boat Purchased",
["boat_rent"] = "Press ~INPUT_PICKUP~ to buy a boat for %s$",
["boat_buy"] = "You received %s$ for selling fish",
["boat_notify"] = "You have purchased a boat. Enjoy!",
["anchor_title"] = "Anchor",
["anchor_drop"] = "Press ~INPUT_PICKUP~ to drop the anchor",
["anchor_pull"] = "Press ~INPUT_PICKUP~ to pull up the anchor",
["anchor_notify_drop"] = "Anchor has been dropped",
["anchor_notify_pull"] = "Anchor has been pulled up",
["afk_fishing"] = "Press ~INPUT_PICKUP~ to go ~r~AFK~w~ fishing",
["manuel_fishing"] = "Press ~INPUT_COVER~ for ~b~Manual~w~ fishing",
["fishing_cancel"] = "~INPUT_VEH_DUCK~: ~r~Cancel",
["minigame_fish_bites"] = "Something's biting! Press the key: %s to reel in the fishing rod",
["minigame_false_key"] = "That was the wrong key :(",
["sell_title"] = "Sale",
["sell_fish"] = "Press ~INPUT_PICKUP~ to sell your fish",
["not_enough_money"] = "You don't have enough money on you",
-- Discord Logs
["discord_title"] = "Fish Sale Log",
["discord_sellmessage"] = "Player %s sold fish for **%s**$!",
},
}
›config_server.luaComplete file · 16 lines
Server_Config = {}
Server_Config.WebhookSettings = {
color = 159900,
name = "SIX-FISHING",
icon_url = "https://i.imgur.com/JFU0rBJ.png",
author_url = "https://i.imgur.com/JFU0rBJ.png",
server_name = "6-services"
}
Server_Config.Webhooks = {
['sellfish'] = {
link = "https://discord.com/api/webhooks/...",
enable = true
},
}
05Troubleshooting
“You don't own a fishing rod!”
FishingItem is true and the player has no item named like itemRod.
Nothing lands in the inventory.
The reward items do not exist, or the inventory is full while Config.weight is true.
06Still stuck?
Open a ticket on our Discord. Send the script name, your framework and version, and the full error from the server console (F8 for client errors). That saves a round of questions.
