[FREE] 5M-CodeX Fishing Resource

5M-CodeX Fishing Script

fishing

This script enables players to enjoy a realistic fishing experience in your FiveM server.

Features

  • Fishing Spots: Various fishing locations are marked on the map with blips for players to discover and explore.
  • Sell Fish: Earn money by selling the fish you catch to a designated NPC.
  • Fishing Animation: Immerse players in a lifelike fishing animation complete with sound effects.
  • Informative Notifications: Helpful notifications guide players through the fishing process.

Getting Started

Prerequisites

  • codex-sounds: For Reel/fish sounds.
  • ox_lib: A Lua library for FiveM development.
  • ND_Core: A core resource for FiveM servers.

Installation

  1. Add the script to your FiveM server resources.
  2. Ensure dependencies (ox_lib and ND_Core) are installed.
  3. Start your FiveM server.

Usage

  1. Fishing:

    • Approach fishing spots marked on the map.
    • Press [E] to start fishing.
    • Enjoy the fishing animation and sounds.
  2. Selling Fish:

    • Locate the designated NPC (marked on the map) for selling fish.
    • Approach the NPC.
    • Press [E] to sell your caught fish and earn money.

Sounds

Sound effects have been added for catching fish and reeling in the fishing pole.

Config.lua

This document provides details on configuring the Config.lua file for the Fishing Script.

  • Configuration Parameters

  • Debug Mode (Config.DebugMode): Set this to true to enable debug messages, or false to disable. Debug messages can be helpful for troubleshooting.

  • Fishing Locations (Config.FishingLocations): Define the coordinates and names of fishing spots in the Config.FishingLocations table. Each entry should have the coords (vector3) and name fields.

  • Sell NPC Coordinates (Config.SellNpcCoords): Adjust the coordinates and heading of the sell NPC using Config.SellNpcCoords (vector4). The last value is the heading.

Config = {}

Config.DebugMode = true  -- Set to true to enable debug messages, false to disable
Config.FishingLocations = {
    { coords = vector3(28.11, 852.58, 197.73), name = "Lake" },
    { coords = vector3(2000.0, 3000.0, 0.0), name = "Sea" },
    -- Add more fishing locations as needed
}

Config.SellNpcCoords = vector4(36.85, 861.17, 197.73, 310.09)

Config.WaterTypes = {
    Lake = {
        FishTypes = {
            { name = "Bass", price = 10 },
            { name = "Trout", price = 8 },
            -- Add more lake fish types as needed
        },
    },
    Sea = {
        FishTypes = {
            { name = "Salmon", price = 15 },
            { name = "Catfish", price = 12 },
            -- Add more sea fish types as needed
        },
    },
}

Download

Code is accessible Yes
Subscription-based No
Lines (approximately) 200
Requirements ox_lib - ND_Core - codex-sound
Support Yes
1 Like

download link?

I accidentally put it in the config block

11/10 Smartest dev (jk)

I’ve completely forgotten to post the link before

You’re not supposed to share discord links. Support is meant to be done here on the forum, not in other random places. See the advertising section of the release rules

Advertising

Any advertisement is not tolerated. This includes any mentions of support through third-party > services like Discord and websites. If you would like to contact a user do so via Direct Messages or > find their contact details via their profile description. Advertising includes, but is not limited to:

  • Any Discord link/user (this includes extra support)

Please refer to what smallo posted.

Update client.lua v1.2.0

Cooldown Check Command:

  • V2 introduces a command huntcd for checking remaining cooldown. It’s bound to “INSERT” key.

Cooldown Duration Handling:

  • V1 uses seconds (e.g., huntDuration = Config.huntDuration, cooldownDuration = Config.cooldownDuration).
  • V2 uses milliseconds (e.g., huntDuration = Config.huntDuration * 1000, cooldownDuration = Config.cooldownDuration * 1000).

Blip Icon Change:

  • Changed blip icon from sprite 304 to 141 for hunting zones.

Code Organization:

  • V2 has slightly improved code organization.

Milliseconds for Remaining Time:

  • V1 decrements remaining time in seconds (remainingTime = remainingTime - 1).
  • V2 calculates remaining time in milliseconds (remainingTime = Config.huntDuration * 1000 - timeDifference).