Exports

Parameter Types

Common parameters used across exports:

  • categoryUid (string): Category uid (e.g., 'personal')

  • skillUid (string): Unique skill identifier (e.g., 'swimming_1', 'melee_damage_1')

  • source (number): Player server ID (required for server-side)

  • amount (number): Numeric value for XP/points


Client Side Exports

Reload Default Skills

Reloads all skills in the 'personal' category to their default states. Can be useful for some people after ambulance respawn.

exports['devhub_skillTree']:reloadDefaultSkills()

Close Skill Tree

Programmatically closes the skill tree UI.

exports['devhub_skillTree']:closeSkillTree()

Get Config

Returns current configuration of skills and categories.

Returns:


Set Pre Made Xp Earning Status

Enable or disable pre-made ways of earning XP. You can use this to disable XP earning temporarily while a player is engaged in another activity.

status false - xp will be disabled

status true - xp will be enabled (default set by skill tree script)

Server Side Exports

Get Player Level

Gets the player's level in a specific skill category.

Parameters:

  • categoryUid (string): Skill category name

  • source (number): Player server ID

Returns: Current level (number) or 0 if not found

Example


Get Player Xp

Gets the player's current XP in a specific skill.

Parameters:

  • categoryUid (string): Skill category name

  • source (number): Player server ID

Returns: Current XP (number) or 0 if not found

Example


Get Player Points

Gets the player's available points for a specific skill.

Parameters:

  • categoryUid (string): Skill category name

  • source (number): Player server ID

Returns: Available points (number) or 0 if not found

Example


Get Player Total Xp

Gets the player's total accumulated XP in a specific skill.

Parameters:

  • categoryUid (string): Skill category name

  • source (number): Player server ID

Returns: Total XP (number) or 0 if not found

Example


Get Player Global Stats

Gets the player's global statistics across all skills.

Parameters:

  • source (number): Player server ID

Returns:

Example


Get Unlocked Skills

Gets all skills unlocked by the player.

Parameters:

  • source (number): Player server ID

Returns: Table of unlocked skills or false if player not found

Example


Remove Xp

Removes XP from a specific skill category.

Parameters:

  • categoryUid (string): Skill category name

  • amount (number): Amount of XP to remove

  • source (number): Player server ID

Example


Remove Points

Removes skill points from a specific category.

Parameters:

  • categoryUid (string): Skill category name

  • amount (number): Amount of points to remove

  • source (number): Player server ID

Example


Unlock Skill

Parameters:

  • categoryUid (string): Skill category name

  • skillUid (string): Skill uid

  • source (number): Player server ID

Example


Shared Exports

These exports work on both client and server side.

Has Unlocked Skill

Checks if a player has unlocked a specific skill.

Parameters:

  • categoryUid (string): Skill category name

  • skillUid (string): Unique identifier of the skill

  • source (number): Player server ID (server-side only)

Returns: true if unlocked, nil otherwise

Example


Add Xp

Adds XP to a specific skill.

Parameters:

  • categoryUid (string): Skill category name

  • amount (number): Amount of XP to add

  • source (number): Player server ID (server-side only)

Example


Add Points

Adds skill points to a specific category.

Parameters:

  • categoryUid (string): Skill category name

  • amount (number): Amount of points to add

  • source (number): Player server ID (server-side only)

Example


Get Skill Effect

Gets the effect value of a specific skill.

Parameters:

  • categoryUid (string): Skill category name

  • skillUid (string): Unique identifier of the skill

Returns: Effect value (number) or 5 if not found

Example

Last updated