Skip to content

Installation ​

Requirements ​

  • A recent FiveM server artifact (Lua 5.4)
  • oxmysql
  • np_npchandler 1.1.0+: the buyer and shop peds
  • np_prophandler 1.1.0+: the rod, the float, the shown-off and dropped fish, the market stalls
  • Node 18+ to build the NUI once

oxmysql, np_npchandler and np_prophandler are dependencies in the fxmanifest and must start before np_fishing.

Optional, auto-detected at start:

Kind Resources Used for
Framework es_extended, qbx_core, qb-core Identifiers, names, cash and bank, jobs (rangers, restaurants), admin groups. Without one, np_fishing runs standalone: nothing costs and nothing pays
Inventory np_inventory, ox_inventory, qb-inventory (ps / lj) Gear, bait, fish and the cooler as items. Without one every character gets a virtual tackle box and cooler (see Bridges)
Staff np_admin, np_discord Permission nodes, Resource settings, staff tools, logs and the server theme. Without them a fallback decides who is staff
Phone np_phone The Angler app, notifications, Dynamic Island, calendar, catch photos, shared spots
Licence np_identification The fishing_license document and licence points. Without it no licence is required
Other np_* siblings np_hud, np_payments, np_menu, np_character, np_tattoos, np_drugs, np_gangs, np_environmental A built-in fallback for each. See Bridges & integrations
Targets ox_target, qb-target Options on ped-less buyers and shops and the ranger option when np_menu isn't running (else a prompt and E)
Photos screenshot-basic Catch photos for the phone gallery
Zones np_colshape Enter and exit of the interaction points as colshapes. Needed on FiveM Legacy only, GTAV Enhanced has the natives built in. Without it, distance checks as before

Steps ​

  1. Put the folder into your resources as np_fishing. The NUI calls https://np_fishing/rpc, np_phone loads web/dist/phone.html from it, np_inventory shows nui://np_fishing/web/dist/fish/<species>.svg as item images and other resources call exports.np_fishing, so keep the name.
  2. Build the UI once:
    sh
    cd web && npm ci && npm run build
    This creates web/dist/index.html (the HUD and menus), web/dist/phone.html (the np_phone app) and the fish images in web/dist/fish/. web/dist is not committed, so a fresh clone starts with a blank UI until you build it.
  3. Database: the tables (all prefixed np_fishing_) are created on the first start. sql/install.sql holds the same SQL for installing by hand.
  4. Start order in server.cfg: dependencies first, np_fishing last.
    cfg
    ensure oxmysql
    ensure es_extended        # or qbx_core / qb-core
    ensure np_admin
    ensure np_hud
    ensure np_phone
    ensure np_payments
    ensure np_menu
    ensure np_character
    ensure np_identification
    ensure np_inventory       # or ox_inventory / qb-inventory
    ensure np_prophandler     # required
    ensure np_npchandler      # required
    # np_discord, np_tattoos, np_drugs, np_gangs, np_environmental if you run them
    ensure np_fishing
    np_npchandler and np_prophandler are required and start before np_fishing; when one restarts, np_fishing registers its peds or stalls again on its ready event (np_npchandler, np_prophandler). Every other sibling is optional and may also start later: np_fishing re-probes it and registers again.
  5. Items: with np_inventory nothing to do, they are registered at runtime. With ox_inventory or qb-inventory paste the item block, see Items.
  6. Staff: nothing goes into server.cfg. See Permissions.
  7. Check shared/config/: at least the buyers and shops (their coordinates are approximate) and the licence switch.

At start the console prints one line per sibling (active, fallback (…) or missing export <name>) and a ready line (ready: 19 species, … services: …) with the owner of every service seam.

Permissions ​

np_fishing never uses ACE. Every staff check is one call, npAdmin.can(src, node), of the np_admin lib that ships in bridge/np_admin.lua (np_admin stays optional: no dependency, no @np_admin include).

With np_admin its permission matrix decides alone:

Node Grants
np_fishing.admin Every fishing node below
np_fishing.tournaments The tournament screen, /fishtournament, the np_admin tournament tools
np_fishing.prices Reset market prices, cancel anybody's order
np_fishing.progression Give fishing XP (np_admin action Give fishing XP)

Without np_admin a player is staff (every node) when one of these says so:

  1. their FiveM identifier is in Config.Admins ('license:…', 'discord:…');
  2. the framework's admin groups in Config.AdminGroups (ESX xPlayer.getGroup(): admin, superadmin; qb-core / qbx_core HasPermission: admin, god);
  3. np_discord runs and they hold one of Config.AdminDiscordRoles (role ids or np_discord role names, cached for Config.AdminDiscordCacheSeconds).

See Concepts → Permissions.

Tables ​

Table Holds
np_fishing_meta Schema version and module state (key / JSON value)
np_fishing_players One row per angler: name, XP, level, perks, reputation per buyer, stats, settings (alerts, the virtual tackle box)
np_fishing_catches Every landed fish: species, rarity, weight (g), length (cm), quality, zone, position, status (kept, released, sold, spoiled, lost), tournament, bait and lure
np_fishing_buyer_prices Demand per buyer and species
np_fishing_tournaments Tournaments: kind, status, zone, species, entry fee, pool, times, rules, results
np_fishing_tournament_entries Entrants with score, best catch and paid fee
np_fishing_orders NPC, restaurant and player orders
np_fishing_spot_pressure Spot pressure per 80 m cell
np_fishing_timers Scheduled work: tournament start and end, order expiry, cooldowns

Check it works ​

  1. ensure np_fishing after its siblings and read the console: one line per sibling and the ready line.
  2. Get a rod kit: buy it at Sandy Shores Bait & Tackle (Alamo Sea) or spawn the items, then open the tackle box (F7) and mount reel, line, hook, float and bait. Without an inventory the starter kit is already there.
  3. Get a fishing licence (np_identification, city hall or a ranger) if one is required.
  4. Walk to the Alamo Sea shore, use the rod (or /fish), hold the left mouse button and release in the white window.
  5. Wait for the bite, click inside the window, fight (keep the needle in the green, counter runs with A / D), keep the fish.
  6. Sell at Sandy Shores Bait (fresh water) or Pearl's Seafood (Del Perro Pier, salt water), open the Angler app on the phone, and as staff try /fishtournament.

Troubleshooting ​

Problem Fix
Blank screen, no HUD Build the NUI (web/dist missing)
Nothing costs and nothing pays No framework was found at start, so np_fishing runs standalone. Start the framework before np_fishing
Items have no label or can't be used (ox / qb) Paste the item block into the inventory's item list
Using a rod says what is missing The rig isn't complete: mount the missing parts in the tackle box (F7)
No fishing licence Get a fishing_license from np_identification, fish at a public pier, or set Config.License.required = false
Buyer ped stands in a wall The coordinates in Config.Economy.buyers / shops are approximate; move them
Something does not show Config.Debug = true, then watch the console and the NUI devtools (F8 → nui_devtools)
A sibling line says missing export <name> That sibling's version lacks an export np_fishing uses; the fallback runs. Update the sibling