Reputation

CLIENT & SERVER SIDE

A standalone reputation system that provides a flexible approach to managing reputations for various entities like jobs, NPC groups, or factions. It operates independently of any external framework, making it suitable for a wide range of applications.

Client Functions

get_reputations

Retrieve a list of all reputations the player has.

--- Utils object
local reputations = utils.reputation.get_reputations()

--- Direct export
local reputations = exports.boii_utils:get_reputations()

get_reputation

Retrieve a specific reputation the player has.

--- Define reputation
local reputation = 'ballas'

--- Utils object
utils.reputation.get_reputation(reputation)

--- Direct export
exports.boii_utils:get_reputation(reputation)

Server Functions

get_reputations

Use the follow to retrieve all reputation data for the player.

--- Utils object
local reputations = utils.reputation.get_reputations(source)

--- Direct export
local reputations = exports.boii_utils:get_reputations(source)

get_reputation

Use the following to get a specific reputation for the player.

--- Specify reputation id
local reputation_id = 'ballas'

--- Utils object
local player_rep = utils.reputation.get(source, reputation_id)

--- Direct export
local player_rep = exports.boii_utils:get_reputation(source, reputation_id)

modify_reputation

Use the following to modify a reputation the player holds.

A reputation entry will be added for the player automatically the first time it is modified.

--- Specify reputation id
local reputation_id = 'ballas'
--- Specify value
local value = 100
--- Specify operation 'add', 'remove', 'set'
local operation = 'add'

--- Utils object
utils.reputation.modify(source, reputation_id, value, operation)

--- Direct export
exports.boii_utils:modify_reputation(source, reputation_id, value, operation)

Last updated