Server

Server-side exports for managing fishing rods and fishing skills.

Exports

giveFishingRod

exports.peak_fishing:giveFishingRod(playerId, tier)
playerIdrequirednumber
The server ID of the player to give the fishing rod to.
tierrequirednumber
0
The tier level of the fishing rod (0-4).

addXp

exports.peak_fishing:addXp(playerId, amount)
playerIdrequirednumber
The server ID of the player to add XP to.
amountrequirednumber
The amount of XP to add.

removeXp

exports.peak_fishing:removeXp(playerId, amount)
playerIdrequirednumber
The server ID of the player to remove XP from.
amountrequirednumber
The amount of XP to remove.

setLevel

exports.peak_fishing:setLevel(playerId, level)
playerIdrequirednumber
The server ID of the player to set the level for.
levelrequirednumber
The fishing skill level to set.

getLevel

exports.peak_fishing:getLevel(playerId)
playerIdrequirednumber
The server ID of the player to get the level for.

upgradeRod

exports.peak_fishing:upgradeRod(playerId, slot)
playerIdrequirednumber
The server ID of the player whose fishing rod will be upgraded.
slotrequirednumber
The inventory slot number containing the fishing rod to upgrade.

Returns boolean, string|label - Success status and either an error reason or the new rod's label on success.

Possible error reasons:

  • invalid_item: The specified slot doesn't contain a fishing rod
  • max_tier: The rod is already at maximum tier
  • invalid_config: The next tier configuration doesn't exist
  • level_requirement: The player doesn't meet the level requirement
  • cant_afford: The player can't afford the upgrade