Exports
Exported functions for managing business data including XP, levels, money, stock, and warnings. All functions include parameter validation and error handling.
Server-Side
All exports are server-side only and must be used in server-side scripts.
Get Business Level
Description:
Retrieves the current level and XP of a business. Returns a table containing level (number) and xp (number) values.
Parameters:
businessKey(string): The unique identifier of the business
Usage:
local data = exports['R6-MoneyWash']:GetBusinessLevel(businessKey)
print('Level:', data.level, 'XP:', data.xp)Add Business XP
Description: Adds experience points to a business. This will automatically trigger the leveling system when enough XP is accumulated.
Parameters:
businessKey(string): The unique identifier of the businessamount(number): The amount of XP to add (must be positive)
Usage:
exports['R6-MoneyWash']:AddBusinessXP(businessKey, amount)Add Business Money
Description: Adds money to a business balance. Supports both dirty money and clean money types.
Parameters:
businessKey(string): The unique identifier of the businesstype(string): The money type -'dirty'or'clean'amount(number): The amount of money to add (must be positive)
Usage:
exports['R6-MoneyWash']:AddBusinessMoney(businessKey, type, amount)Remove Business Money
Description: Removes money from a business balance safely. The balance will never go below zero.
Parameters:
businessKey(string): The unique identifier of the businesstype(string): The money type -'dirty'or'clean'amount(number): The amount of money to remove (must be positive)
Usage:
exports['R6-MoneyWash']:RemoveBusinessMoney(businessKey, type, amount)Add Business Stocks
Description: Increases the current stock quantity of a business.
Parameters:
businessKey(string): The unique identifier of the businessamount(number): The quantity to add (must be positive)
Usage:
Remove Business Stocks
Description: Decreases the current stock quantity of a business. The stock will never go below zero.
Parameters:
businessKey(string): The unique identifier of the businessamount(number): The quantity to remove (must be positive)
Usage:
Add Business Warning
Description: Adds warnings to a business. If no amount is specified, it defaults to 1 warning.
Parameters:
businessKey(string): The unique identifier of the businessamount(number, optional): The number of warnings to add (defaults to 1)
Usage:
Remove Business Warning
Description:
Removes warnings from a business. You can specify a number or use 'all' to remove all warnings at once.
Parameters:
businessKey(string): The unique identifier of the businessamount(number|string): The number of warnings to remove, or'all'to remove all warnings
Usage:
Last updated