⚙️Add new currency
Installation for SA-Money script (Adding new currency)
If you have successfully installed the script, then you can add new currency by these steps
More currencies = bigger impact on performance
First of all, we need to config your config.lua in SA-Money-v2
Money = {
Currencies = {
[1] = {
currency = 'cash',
item = 'money',
prop = 'prop_cash_pile_02',
},
[2] = {
currency = 'blackmoney',
item = 'black',
prop = 'prop_cash_pile_02',
--chance = 1.0, -- 0.7 = 70% chance to success / 30% to call a cops (DOESN'T WORK FOR NOW)
},
--[[[3] = {
currency = 'printedbills',
item = 'printedbills',
prop = 'prop_cash_pile_02',
--chance = 1.0, -- 0.7 = 70% chance to success / 30% to call a cops (DOESN'T WORK FOR NOW)
}, ]]
}
}
Now, we have to create an item in qb-core > shared > items.lua same way as you added cash
['black'] = {['name'] = 'black', ['label'] = 'Black Money', ['weight'] = 0, ['type'] = 'item', ['image'] = 'cash.png', ['unique'] = false, ['useable'] = false, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = 'Money?'},
The next step is to add new currency into the config.lua in QB-Core
QBConfig.Money = {}
QBConfig.Money.MoneyTypes = { cash = 500, bank = 5000, crypto = 0, blackmoney = 0, printedbills = 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', 'blackmoney', 'printedbills' } -- Money that is not allowed going in minus
Now it's done and it should work. If it doesn't work try other tips or contact us on Discord
Last updated