Exports

Exports for integration with other scripts

Society Account Exports

These exports allow you to manage society/job bank accounts from other scripts.

GetAccountBalance

Get the balance of a society account.

exports['fsg_banking']:GetAccountBalance(society)

Parameters

Name
Type
Description

society

string

Society/job name (e.g., "police", "ambulance")

Returns

Type
Description

number

Account balance

Example

local balance = exports['fsg_banking']:GetAccountBalance('police')
print('Police account balance: $' .. balance)

GetAccount

Alias for GetAccountBalance.

exports['fsg_banking']:GetAccount(society)

Parameters

Name
Type
Description

society

string

Society/job name

Returns

Type
Description

number

Account balance


AddMoney

Add money to a society account.

Parameters

Name
Type
Description

society

string

Society/job name

amount

number

Amount to add

reason

string?

Optional reason (for future logging)

Returns

Type
Description

boolean

true if successful, false otherwise

Example


RemoveMoney

Remove money from a society account.

Parameters

Name
Type
Description

society

string

Society/job name

amount

number

Amount to remove

reason

string?

Optional reason (for future logging)

Returns

Type
Description

boolean

true if successful, false otherwise

Example


Credit Score Exports

These exports allow you to interact with the credit score system.

circle-info

Credit score exports require Config.CreditScore.enabled = true in your config.

GetCreditScore

Get a player's current credit score.

Parameters

Name
Type
Description

identifier

string

Player identifier

Returns

Type
Description

number?

Credit score, or nil if not found

Example


GetCreditScoreData

Get full credit score data for a player including history.

Parameters

Name
Type
Description

identifier

string

Player identifier

Returns

Type
Description

table?

Credit score data table, or nil if not found

Return Table Structure


ModifyCreditScore

Modify a player's credit score by a specified amount.

Parameters

Name
Type
Description

identifier

string

Player identifier

modifier

number

Score change (positive or negative)

reason

string

Reason for the change (logged in history)

Returns

Type
Description

boolean

true if successful

Example


HasGoodCredit

Check if a player has a credit score above a threshold.

Parameters

Name
Type
Description

identifier

string

Player identifier

threshold

number?

Optional threshold (defaults to 600)

Returns

Type
Description

boolean

true if score >= threshold

Example


Integration Example

Here's a complete example of integrating fsg_banking with another script:


Notes

  • Society names can be passed with or without the society_ prefix (e.g., both "police" and "society_police" work)

  • All exports are server-side only

  • Credit score exports return nil or false when the credit score system is disabled

Last updated