CityRP Documentation Repository

core.libraries.meska.metrics.server.init

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

Functions

Servermeska.metrics.initFor(ply, cb)Source ☍

Provisions all metrics/stats for a player.

Parameters

  • plyanyPlayer Entity. @func[opt] cb Callback Function.
  • cbany
Servermeska.metrics.syncToDB(cb)Source ☍

Syncs metrics config to database. @func[opt] cb Callback Function.

Parameters

  • cbany
Servermeska.metrics.track(ply, skill, metric, equ, tmp, cb, bonusPercent) → number|nilSource ☍

Tracks metrics and stats for a prop and calculates skill exp and level.

Parameters

  • plyanyPlayer Entity.
  • skillanyThe skill.
  • metricanyThe property.
  • equanyEquotation.
  • tmpanyIf false, update in db. Default: false. @func[opt] cb Callback Function with earned exp as return value. @param[opt] bonusPercent Extra one-off exp bonus percentage (ex: job bonuses).
  • cbany
  • bonusPercentany

Returns

  1. number|nil

Fields

Servermeska.metrics.cacheKeySource ☍