Exports

Export list including compatibility exports

mz-skills Compatibly

Will work without changing xp system in other script configs from mz-skills by default Example exports used in this section can use mz-skills or ss-knowledge for the resource name in the export.

Update Skill

exports['ss_knowledge']:UpdateSkill(branch, xp)

Parameters:

  • branch (name of branch in config. i.e. lockpicking)

  • XP (amount of xp)

Example

exports['ss_knowledge']:UpdateSkill(robbing, 17) -- adds xp
exports['ss_knowledge']:UpdateSkill(robbing, -10) 
-- removes xp (not done well in mz-skills by default)

Check Skill

exports['ss_knowledge']:CheckSkill(branch, xp)

Parameters:

  • branch (name of branch in config. i.e. lockpicking)

  • XP (amount of xp)

Returns:

  • True or False

Example

local result = exports['ss_knowledge']:CheckSkill(branch, xp)
print(result) --will print boolean of true or false

Get Current Skill

Parameters:

  • branch (name of branch in config table. i.e. lockpicking)

Returns:

  • Table of contents - [name, min xp, max xp, current]

example

Script Exports

Get Knowledge Branch

Parameters:

  • XP (amount of xp)

  • branch (name of branch in config. i.e. lockpicking)

Returns:

  • Level number or title ( defaults to number only if level has no name in the config)

  • Full level info (title, minxp, maxxp)

Has checks for the branch being missing in the config.

Example

Get Current Knowledge Branch

Parameters:

  • branch (name of branch in config. i.e. lockpicking)

Returns:

  • Level number or title ( defaults to number only if level has no name in the config)

  • Full level info (title, minxp, maxxp)

Example

Get Branch Tier

Parameters:

  • XP (amount of xp)

  • branch (name of branch in config. i.e. lockpicking)

Returns:

  • Level number

Example

Update Knowledge Branch

Parameters:

  • branch (name of branch in config. i.e. lockpicking)

  • XP (amount of xp to be added or removed)

As this is used for updating the branches xp there is no return result.

Example

Check Knowledge Branch

Parameters:

  • branch (name of branch in config. i.e. lockpicking)

  • XP (amount to check against)

Returns:

  • Boolean (True or False)

Example

Check Knowledge Tier

Parameters:

  • branch (name of branch in config. i.e. lockpicking)

  • level (level to check against)

Returns:

  • Boolean (True or False)

Example

Last updated