Guide 2026-03-04

FiveM Fishing & Hunting System Development

OntelMonke

OntelMonke

Admin & Developer at Agency Scripts

Core Fishing Mechanics

A fishing system provides one of the most relaxing and rewarding side activities on a roleplay server. The core loop involves equipping a fishing rod, approaching a valid water body, casting the line, waiting for a bite, and completing a catch minigame. Start by defining fishing zones as polygon areas or radius-based circles that cover lakes, rivers, the ocean coastline, and piers. Each zone should have its own fish population table with species that logically belong in that environment: freshwater species like bass and trout in lakes, saltwater species like tuna and shark offshore, and river-specific fish like salmon near flowing water. When the player casts their line, start a random timer between a minimum and maximum wait time, influenced by the bait used, time of day, weather conditions, and the player's fishing skill level. Higher skill reduces the wait time and increases the chance of hooking rare species. The cast animation should use TaskStartScenarioInPlace with a fishing scenario to make the player character visually hold a rod and stand at the water's edge.

The Catch Minigame

The minigame is what separates an engaging fishing system from a boring AFK script. Design a skill-based minigame that appears as an NUI overlay when a fish bites. A popular approach is the moving-bar mechanic where a marker oscillates back and forth across a gauge and the player must press a key when the marker is within a highlighted target zone. The size of the target zone scales with the fish's difficulty rating, with common species offering a generous window and legendary fish requiring precise timing. Add multiple rounds to a single catch attempt, where each successful key press reels the fish closer and a miss lets it swim further away. Implement a tension meter that builds as the player reels and decreases when they let the line rest, with the line snapping if tension exceeds the rod's maximum rating. Different rod tiers should have higher tension thresholds, giving players a reason to upgrade their equipment as they progress through the fishing skill tree.

-- Fish loot table configuration
Config.FishingZones = {
    ['alamo_sea'] = {
        label = 'Alamo Sea',
        center = vector3(482.12, 3614.89, 33.17),
        radius = 200.0,
        fishTable = {
            { item = 'fish_bass',       label = 'Largemouth Bass',  weight = {1.5, 4.2},  chance = 35, difficulty = 1, price = 45 },
            { item = 'fish_catfish',    label = 'Channel Catfish',  weight = {2.0, 8.5},  chance = 25, difficulty = 2, price = 65 },
            { item = 'fish_bluegill',   label = 'Bluegill',         weight = {0.3, 1.2},  chance = 30, difficulty = 1, price = 20 },
            { item = 'fish_golden',     label = 'Golden Trout',     weight = {1.0, 3.0},  chance = 8,  difficulty = 4, price = 250 },
            { item = 'item_boot',       label = 'Old Boot',         weight = {0.5, 0.5},  chance = 2,  difficulty = 1, price = 0 },
        },
        requiredBait = { 'bait_worm', 'bait_minnow', 'bait_lure' },
    },
}

Hunting Zones and Animal Spawning

Hunting requires a more dynamic approach than fishing because animals are visible, mobile entities that players must track, stalk, and shoot. Define hunting zones in wilderness areas like the Blaine County forests, Mount Chiliad foothills, and the desert regions around Sandy Shores. Within each zone, spawn animal peds using GTA's native animal models at controlled intervals. Use CreatePed with animal model hashes and give them wander tasks using TaskWanderStandard so they roam naturally within the zone boundaries. Control the spawn density carefully to prevent performance issues: limit each zone to 5-8 active animals at a time per player, and only spawn animals when a player with a hunting license or weapon is within a reasonable distance of the zone. Despawn animals cleanly when no hunters are nearby to free up entity slots. Group animals into herds for species like deer, where shooting one causes the rest to flee using TaskSmartFleePed, creating a realistic hunting experience that rewards patient stalking over running and gunning.

Loot Tables and Harvesting

When a player successfully kills an animal, they should not simply receive items instantly. Implement a harvesting mechanic where the player kneels beside the animal carcass and performs a butchering animation that takes several seconds, during which they are vulnerable. The loot dropped depends on the animal species, the weapon used, and the shot placement. A clean headshot with a rifle yields more intact meat and a pristine pelt, while spraying the animal with an automatic weapon damages the pelt and destroys some meat. Track shot placement by comparing the kill damage position to the animal's head bone coordinates. Each animal should drop a combination of raw meat, a pelt or hide, and secondary items like antlers, feathers, or fat depending on the species. Use item metadata to store the quality grade of each harvested item, which affects the sale price and the quality of crafted goods when processed by a leather worker or cook.

-- Server-side harvesting logic
RegisterNetEvent('hunting:harvest')
AddEventHandler('hunting:harvest', function(netId, weaponHash, boneHit)
    local src = source
    local entity = NetworkGetEntityFromNetworkId(netId)
    if not DoesEntityExist(entity) then return end

    local model = GetEntityModel(entity)
    local animalData = Config.Animals[model]
    if not animalData then return end

    -- Determine quality based on weapon and hit location
    local quality = 'poor'
    if boneHit == 'head' then
        if IsCleanWeapon(weaponHash) then
            quality = 'pristine'
        else
            quality = 'good'
        end
    elseif IsCleanWeapon(weaponHash) then
        quality = 'good'
    end

    local priceMultiplier = Config.QualityMultipliers[quality] -- pristine=1.5, good=1.0, poor=0.5

    -- Give loot items
    for _, loot in ipairs(animalData.lootTable) do
        if math.random(100) <= loot.chance then
            local count = math.random(loot.min, loot.max)
            exports.ox_inventory:AddItem(src, loot.item, count, {
                quality = quality,
                animal = animalData.label,
                weight = math.random(loot.weightMin * 10, loot.weightMax * 10) / 10,
            })
        end
    end

    -- Delete carcass after harvesting
    DeleteEntity(entity)
    TriggerClientEvent('hunting:harvested', src)
end)

Skill Progression System

A progression system keeps fishing and hunting engaging over the long term by rewarding dedicated players with tangible improvements. Track separate skill levels for fishing and hunting, each increasing through successful catches or kills. As fishing skill increases, the bite timer shortens, rare fish become more common in the loot table, the minigame target zone grows slightly wider, and the player unlocks access to premium fishing spots that are gated behind skill thresholds. For hunting, higher skill levels allow the player to see animal tracks as subtle ground markers, increase the detection range for spotting animals, reduce the noise radius when moving through brush, and unlock the ability to use calls and scents that attract specific species to the hunter's location. Store skill XP in your database and calculate the level using a scaling formula where each successive level requires more XP than the last, preventing players from maxing out too quickly while still providing steady advancement that feels rewarding during each play session.

Equipment and Upgrades

Equipment tiers give players short-term goals and meaningful spending targets within the fishing and hunting economy. For fishing, offer a progression from basic wooden rods that can only catch common fish, to fiberglass rods with better tension handling, to carbon fiber rods that reduce catch difficulty and increase rare fish chances. Pair rods with reels that affect how quickly the player can recover line during the minigame. Bait types should directly influence which fish species can be caught: worms for general freshwater, minnows for predatory fish, specialized lures for rare species, and premium bait that doubles the bite rate. For hunting, offer weapon-specific perks where a compound bow is silent but requires closer range, a bolt-action rifle is ideal for clean kills at distance, and a shotgun is effective for birds but damages pelts on larger animals. Add hunting accessories like binoculars for extended spotting range, ghillie suits that reduce the player's detection radius by animals, and a hunting knife that speeds up the harvesting animation. Sell all equipment through a bait shop NPC near fishing locations and a hunting outfitter in rural areas, creating natural gathering points where outdoor enthusiasts can meet and share tips.

Selling Catches and the Outdoor Economy

Connect fishing and hunting to your server's broader economy by providing multiple outlets for selling harvested goods. A fish market NPC should buy all fish at base prices, with rare and heavy specimens commanding premium rates. A butcher NPC purchases raw meat and animal hides. Beyond NPC sales, enable player-to-player trading so that a skilled fisherman can supply a restaurant owner with fresh fish, or a hunter can sell pristine pelts to a leather crafter who turns them into clothing or furniture items. Implement a daily demand system where certain fish or meat types are worth more on specific days, encouraging players to diversify their activities rather than farming the same lucrative species repeatedly. Add a trophy board at fishing and hunting locations that displays the largest fish caught and the rarest animals harvested each week, with the record holders receiving bonus cash or exclusive cosmetic rewards. Consider seasonal events like fishing tournaments or hunting competitions that bring the community together around these outdoor activities.

Performance and Spawning Optimization

Outdoor systems that spawn entities require careful optimization to avoid degrading server performance. For animal spawning, use a proximity-based system that only creates animal peds when a hunter is within a configurable range, typically 150-200 meters. Implement a global entity budget that caps the total number of hunting animals across the entire server, distributing the budget across active zones based on hunter count. Use entity pools that recycle despawned animals rather than creating new ones, reducing the overhead of repeated CreatePed calls. For fishing, avoid spawning visible fish entities entirely since they serve no gameplay purpose and waste entity slots. Instead, use particle effects or subtle water surface animations to indicate a fish on the line. Cache zone configurations in shared memory rather than reading them from the database on every interaction. For both systems, batch database writes by accumulating XP gains, catches, and kills in memory and flushing them to the database every 30-60 seconds rather than on every individual event. This dramatically reduces database query volume during peak hours when many players are fishing or hunting simultaneously.

Share this article

Ready to upgrade your server?

Check out our premium FiveM scripts in the Agency Scripts store or join our Discord community for support and updates.