Economy API
The Economy API allows your scripts to interact with the game's economy system, including accessing and manipulating the player's money, both cash and online balance, creating transactions, and modifying certain game economy rules.
Implementation Status: Partially implemented. Basic economy functions are available.
Available Functions
Money Management
- GetPlayerCash - Get the player's current cash balance
- GetPlayerOnlineBalance - Get the player's current online bank balance
- GetLifetimeEarnings - Get the player's lifetime earnings
- GetNetWorth - Get the player's total net worth (cash + online balance)
- AddPlayerCash - Add cash to the player's on-hand balance
- RemovePlayerCash - Remove cash from the player's on-hand balance
- AddOnlineBalance - Add to the player's online bank balance
- RemoveOnlineBalance - Remove from the player's online bank balance
- CheckIfCanAfford - Check if the player can afford a specific amount
- FormatMoney - Format a money amount for display
Transactions
- CreateTransaction - Create a transaction and deduct money
ATM Management
- GetATMDepositLimit - Get the current ATM deposit limit
- SetATMDepositLimit - Set the ATM deposit limit
Examples
See the Economy Examples page for practical examples of using the Economy API in your scripts.
Limitations
- Changes to the player's bank balance via the API won't be reflected in the game's UI until an ATM is interacted with or other game events update the UI.
- Transaction history is tracked internally but not currently exposed via the API.
Coming Soon
- Transaction history access
- Store price manipulation
- Economic event hooks