CityRP Documentation Repository

core.libraries.meska.custombonus.server.init

Metrics-Skill-Achievement Framework (MESKA) The custombonus-system core functions.

Functions

Servermeska.custombonus.add(ply, skill, buff, tit, src, tmp, cb) → integer|nilSource ☍

Adds custombonus for a player to their storage.

Parameters

  • plyanyThe player.
  • skillanyThe skill.
  • buffanyThe buff.
  • titanyThe title.
  • srcanyThe source.
  • tmpanyIf false, store in db. Default: false. @func[opt] cb Callback Function with id as return value.
  • cbany

Returns

  1. integer|nil
Servermeska.custombonus.get(ply, skill) → integerSource ☍

Gets total buffs of active custombonuses for player and skill/globally.

Parameters

  • plyanyPlayer Entity.
  • skillanyThe skill.

Returns

  1. integerTotal buffs.
Servermeska.custombonus.loadFor(ply, cb) → tableSource ☍

Loads all custombonuses for a player from DB.

Parameters

  • plyanyPlayer Entity. @func[opt] cb Callback Function.
  • cbany

Returns

  1. table
Servermeska.custombonus.remove(ply, id, cb) → nilSource ☍

Removes a custombonus.

Parameters

  • plyanyThe player.
  • idanyThe id. @func[opt] cb Callback Function.
  • cbany

Returns

  1. nil
Servermeska.custombonus.syncToClient(ply, cb) → nilSource ☍

Syncs custombonus to player.

Parameters

  • plyanyPlayer Entity. @func[opt] cb Callback Function.
  • cbany

Returns

  1. nil
Servermeska.custombonus.update(ply, id, buff, cb) → nilSource ☍

Updates custombonus for a player.

Parameters

  • plyanyThe player.
  • idanyThe id.
  • buffanyThe buff. @func[opt] cb Callback Function.
  • cbany

Returns

  1. nil

Fields

Servermeska.custombonus.cacheKeySource ☍