DirkScripts Logo

Login With FiveM

Login

Exports

dirk_fishing exposes a small server-side API so other resources can read and award fishing progression — hook fishing XP into jobs, rewards, events, or your own scripts.

Every export takes a server id (an online player). XP is stored in the player's fishingXp metadata, and levels are derived from XP using the same curve as the in-game guidebook — so anything you set is reflected live (guidebook, catch window, level gates) without a relog.


getXp

Return a player's current fishing XP.

lua
local xp = exports.dirk_fishing:getXp(source)
ArgumentTypePurpose
srcnumberServer id of an online player.

Returns a number (0 if the player has no XP yet or the source isn't loaded).


getLevel

Return a player's current fishing level, derived from their XP via the configured curve (baseXP / modifier / baseLevel / maxLevel in the Basic → Skill Settings of the Live Script Configurator).

lua
local level = exports.dirk_fishing:getLevel(source)
ArgumentTypePurpose
srcnumberServer id of an online player.

Returns a number — the level shown to the player in-game.


addXp

Grant fishing XP to a player. Fires the live UI sync automatically.

lua
exports.dirk_fishing:addXp(source, 250) -- give 250 fishing XP
ArgumentTypePurpose
srcnumberServer id of an online player.
amountnumberXP to add. Non-positive values are ignored.

Returns the player's new XP total (number).


removeXp

Take fishing XP from a player. The total is clamped at 0 (never negative).

lua
exports.dirk_fishing:removeXp(source, 100)
ArgumentTypePurpose
srcnumberServer id of an online player.
amountnumberXP to remove. Non-positive values are ignored.

Returns the player's new XP total (number).


setXp

Overwrite a player's fishing XP outright (clamped to ≥ 0). Useful for resets or migrating XP in from another system.

lua
exports.dirk_fishing:setXp(source, 5000)
ArgumentTypePurpose
srcnumberServer id of an online player.
amountnumberThe XP value to set.

Returns the player's new XP total (number).


Example

lua
-- Reward a delivery job with fishing XP, then check if they levelled up
local before = exports.dirk_fishing:getLevel(source)
exports.dirk_fishing:addXp(source, 300)
local after = exports.dirk_fishing:getLevel(source)

if after > before then
  -- notify the player they hit a new fishing level
end

Tunables for the XP curve (base XP, modifier, base/max level) live under Basic → Skill Settings in the Live Script Configurator — no Lua edits needed.

Copyright © 2026 DirkScripts.

Not affiliated with or endorsed by Rockstar North, Take-Two Interactive, or any other rights holders. FiveM is a copyright and registered trademark of Take-Two Interactive Software, Inc.
Our checkout system is provided by Tebex Limited, who manage payment processing, product delivery, and billing support. Prices shown in currencies other than GBP are approximate conversions updated daily. All purchases are processed in GBP, so the final amount charged may vary depending on your bank or payment provider’s exchange rate.