REC_Economy
Matching your framework
Welcome to REC_Economy documentation.
- Added
- Updated
What this gives you: correct numbers on whatever framework you run.
Balances are read straight from your character table, so the table and column names have to match. That mapping is REC_Utils' job — its sv.framework adapter carries the character schema — and preset = "auto" works itself out: qb and qbx use the qb preset, ESX uses the ESX one, anything else falls back to custom.
| Preset | Table | Money column | Last login |
|---|---|---|---|
qb | players | money | last_logged_out |
esx | users | accounts | None, so everybody is counted |
custom | Yours | Yours | Yours |
ox_core ends up on custom, because its cash is an inventory item rather than a column. Point moneyColumn at whatever your setup does save, and register the cash item below instead.
Money items
What this gives you: cash that sits in pockets gets counted like cash in a bank.
---@type table<string, REC_Economy.Server.Config.MoneyItem>
config.moneyItems = {
["black_money"] = {
---[[
--- Which currency this item counts as
---]]
type = moneyTypes.black_money,
---[[
--- Value per item. 1 item counts as this much currency.
---]]
multiplier = 1,
},
}
The types you can use are cash, bank_money, black_money and crypto.
If cash on your server is an item, also set
config.counting.skipMoneyTypes.cash = true. Otherwise the same cash is counted twice — once from the character row, once from the item — and your total is inflated.