core.libraries.meska.custombonus.server.init
Metrics-Skill-Achievement Framework (MESKA) The custombonus-system core 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
- 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
- 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
- table
- Servermeska.custombonus.remove(ply, id, cb) → nilSource ☍
-
Removes a custombonus.
Parameters
- plyanyThe player.
- idanyThe id. @func[opt] cb Callback Function.
- cbany
Returns
- nil
- Servermeska.custombonus.syncToClient(ply, cb) → nilSource ☍
-
Syncs custombonus to player.
Parameters
- plyanyPlayer Entity. @func[opt] cb Callback Function.
- cbany
Returns
- 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
- nil
- Servermeska.custombonus.cacheKeySource ☍