Skip to main content

Requirements

  • A working cc_lib install (provides the framework, inventory, notification, and target wrappers).
  • ox_lib and oxmysql.
  • An inventory system — ox_inventory or qb-inventory.
  • A MySQL database reachable via oxmysql.
The treasure safe uses the built-in ox_lib skill check by default. cc_minigames is only needed if you switch to it in client/minigames.lua — see configuration.

Steps

1

Place the resource

Copy cc_fishing into a resources directory the server loads. The repo ships under resources/[cc]/cc_fishing/.
2

Database tables

The resource creates its four tables on first start (cfg.autoInstallDatabase = true), so there’s nothing to do here in most cases:
cc_fishing_player         -- per-player level, xp, logbook, challenges
cc_fishing_leaderboard    -- per-fish, per-player best length
cc_fishing_tournaments    -- weekly tournament history + prizes
cc_fishing_nets           -- placed fish nets
If your MySQL user can’t run CREATE TABLE at runtime, set cfg.autoInstallDatabase = false and import sql/install.sql by hand instead:
mysql -u <user> -p <database> < resources/[cc]/cc_fishing/sql/install.sql
3

Add the inventory items

Add the item definitions below, then drop the matching PNGs into your inventory’s images folder (each filename must match the item’s image field). The block reuses the legacy fishing image names, so any existing fishing image pack plugs in directly.weapon_pistol and weapon_marksmanpistol are GTA weapon hashes — no item entry needed. lockpick ships in the default lists, so skip it if it’s already there.
Add the following items to ox_inventory/data/items.lua
-- Rods
fishingrod  = { label = 'EZ Cast 2000',        weight = 1500, stack = false, close = true },
fishingrod2 = { label = 'Coastal Caster Plus', weight = 1700, stack = false, close = true },
fishingrod3 = { label = 'Predator Pro Rod',    weight = 2000, stack = false, close = true },

-- Baits
earthworms    = { label = 'Earthworms',           weight = 50 },
crickets      = { label = 'Crickets',             weight = 50 },
leeches       = { label = 'Leeches',              weight = 50 },
glowworms     = { label = 'Glowworms',            weight = 50 },
treasure_bait = { label = 'Treasure Hunter Bait', weight = 50 },

-- Equipment
logbook        = { label = 'Fishing Logbook',   weight = 250,  stack = false, close = true },
anchor         = { label = 'Anchor',            weight = 4000 },
bait_shovel    = { label = 'Bait Shovel',       weight = 1500, stack = false },
fishinghat     = { label = 'Lucky Fishing Hat', weight = 200,  stack = false, close = true },
fishingnet     = { label = 'Fishing Net',       weight = 2500 },
net_repair_kit = { label = 'Net Repair Kit',    weight = 800 },
illegal_hook   = { label = 'Illegal Hook',      weight = 50 },

-- Fish (common)
salmon  = { label = 'Salmon',  weight = 800 },
trout   = { label = 'Trout',   weight = 600 },
bass    = { label = 'Bass',    weight = 700 },
catfish = { label = 'Catfish', weight = 900 },
perch   = { label = 'Perch',   weight = 300 },
pike    = { label = 'Pike',    weight = 700 },
carp    = { label = 'Carp',    weight = 700 },

-- Fish (uncommon)
bluegill = { label = 'Bluegill', weight = 400 },
cod      = { label = 'Cod',      weight = 1100 },
herring  = { label = 'Herring',  weight = 300 },
walleye  = { label = 'Walleye',  weight = 800 },
bream    = { label = 'Bream',    weight = 500 },
zander   = { label = 'Zander',   weight = 700 },

-- Fish (rare)
sturgeon     = { label = 'Sturgeon',     weight = 4000 },
swordfish    = { label = 'Swordfish',    weight = 3000 },
tuna         = { label = 'Tuna',         weight = 2500 },
muskellunge  = { label = 'Muskellunge',  weight = 1200 },
tarpon       = { label = 'Tarpon',       weight = 3500 },
giantcatfish = { label = 'Giant Catfish', weight = 4500 },

-- Fish (very rare)
whale            = { label = 'Whale',             weight = 50000, stack = false },
shark            = { label = 'Shark',             weight = 8000 },
eel              = { label = 'Eel',               weight = 800 },
arapaima         = { label = 'Arapaima',          weight = 6000 },
giantsnakehead   = { label = 'Giant Snakehead',   weight = 1500 },
goliathtigerfish = { label = 'Goliath Tigerfish', weight = 3000 },

-- Fish (legendary)
devilray        = { label = 'Devil Ray',        weight = 9000,  stack = false },
kraken          = { label = 'Kraken',           weight = 80000, stack = false },
megalodon       = { label = 'Megalodon',        weight = 60000, stack = false },
giantcoelacanth = { label = 'Giant Coelacanth', weight = 7000,  stack = false },
goldenfish      = { label = 'Golden Fish',      weight = 500,   stack = false },

-- Treasure loot (pawnshop sellable)
gold_coin        = { label = 'Gold Coin',          weight = 30 },
vintage_watch    = { label = 'Vintage Watch',      weight = 100 },
antique_locket   = { label = 'Antique Locket',     weight = 80 },
captain_spyglass = { label = "Captain's Spyglass", weight = 600 },
captain_compass  = { label = "Captain's Compass",  weight = 250 },
treasure_map     = { label = 'Treasure Map',       weight = 50, stack = false },
pharaohs_scarab  = { label = "Pharaoh's Scarab",   weight = 200 },
emperors_jade    = { label = "Emperor's Jade",     weight = 300 },
megalodon_tooth  = { label = 'Megalodon Tooth',    weight = 700 },
atlantean_coin   = { label = 'Atlantean Coin',     weight = 50 },

-- Safe loot (skip any that already exist in your items.lua)
goldchain = { label = 'Gold Chain', weight = 80 },
goldbar   = { label = 'Gold Bar',   weight = 1500 },
diamond   = { label = 'Diamond',    weight = 50 },
Drop the matching item images into ox_inventory/web/images/ (filenames must match the name of the item).
fishingrod*, treasure_map, and logbook register their own item-use handlers server-side at boot. You don’t need to wire anything in items.lua for those.
4

Ensure after cc_lib

Order matters in server.cfg:
ensure oxmysql
ensure ox_lib
ensure ox_inventory
ensure cc_lib
ensure cc_fishing
cc_fishing’s fxmanifest.lua declares cc_lib, ox_lib, and oxmysql as dependencies — FXServer won’t start it before they’re up. If you switch the treasure safe to cc_minigames, add ensure cc_minigames before cc_fishing.
5

Restart the server

Restart so the new items and resource load.
6

Verify in-game

  1. Drive to Cassidy Creek (default fishing NPC location, (1302.95, 4228.7, 33.91)). A boat-rod blip should be on your map.
  2. Buy an EZ Cast 2000 and some Earthworms from the NPC.
  3. Walk to the water’s edge, equip the rod, and use the cast prompt.
  4. After the bite, complete the minigame — the catch should land in your inventory with length and caught_at metadata visible on hover.
  5. Drive to the pawnshop NPC in Mission Row ((-1459.56, -413.97, 35.74)) and sell the catch.
Set cfg.debug = true in shared/config.lua for verbose server logging while you test.
7

Configure

Defaults are sensible, but most servers will want to move the NPCs, adjust payment sources, or rebalance prices. All tunables, NPC placement, and editable Lua files are covered in the configuration guide.