BACKUP
your resources
folder cause when something is wrong you have a backup.cash
, black_money
, crypto
is not dependent on the item amount, but the item amount is dependent on the currency amount.ensure mh-cashasitem
, make sure this is above ensure [qb]
ensure qb-core
ensure mh-cashasitem -- add here
ensure [qb]
ensure [standalone]
ensure [voice]
ensure [defaultmaps]
ensure [mh]
/cash
to see the amount/bank
to see the amount/blackmoney
to see the amount/crypto
to see the amount
QBConfig.Money.MoneyTypes = { cash = 500, bank = 5000, crypto = 0, black_money = 0 } -- type = startamount - Add or remove money types for your server (for ex. blackmoney = 0), remember once added it will not be removed from the database!
QBConfig.Money.DontAllowMinus = { 'cash', 'crypto', 'black_money' } -- Money that is not allowed going in minus
-- Add Item Example
Player.Functions.AddItem(ItemData.name, amount, toSlot, ItemData.info)
exports['mh-cashasitem']:UpdateCash(source, ItemData, amount, "add")
-- Remove Item Example Player.Functions.RemoveItem(ItemData.name, amount, toSlot) exports['mh-cashasitem']:UpdateCash(source, ItemData, amount, "remove")
# How to change marketbills to black_money
- The black_money uses the item amount as a number,
- and the marketbills uses the item amount as a table.
- so you need to edit that part of the code.
- from this
```lua
local worth = {value=10} -- table
Player.Functions.AddItem('marketbills', worth) -- to add marketbills
Player.Functions.RemoveItem('marketbills', worth)-- to remove marketbills
local amount = 10 -- number
Player.Functions.AddMoney('black_money', amount) -- to add blackmoney
Player.Functions.RemoveMoney('black_money', amount) -- to remove blackmoney