Studio PLAYERS
  • Studio PLAYERS
  • 📦QB/QBX SCRIPTS
    • 💸SA-MONEY
      • 💡Introduction
      • ⚙️Installation
        • ⚙️Installation
        • ⚙️Migration
        • ⚙️Add new currency
      • 🗃️Displays $ in inventory
      • 📚HUD Implementations
        • 📗17mov_Hud
        • 📗wais-hudv5
    • 💰SA-MONEYWASH
      • 💡Introduction
      • ⚙️Installation
    • 🕐SA-PLAYTIME
      • 💡Introduction
      • ⚙️Installation
      • ✈️Exports
    • ☠️SA-CHARACTERKILL
      • 💡Introduction
      • ⚙️Installation
    • 🧊SA-BOXE
      • 💡Introduction
      • 💡Usage
      • ⚙️Installation
    • 🚦SA-TRAFFICLIGHTSPRIORITY
      • 💡Introduction
      • ⚙️Installation
  • 📦ESX SCRIPTS
    • 🕐SA-PLAYTIME
      • 💡Introduction
      • ⚙️Installation
      • ✈️Exports
    • ☠️SA-CHARACTERKILL
      • 💡Introduction
      • ⚙️Installation
    • 🚦SA-TRAFFICLIGHTSPRIORITY
      • 💡Introduction
      • ⚙️Installation
  • 🛠️FAQ
    • 🛠️General Issues
    • 🛠️SA-Money-V2
Powered by GitBook
On this page
  1. QB/QBX SCRIPTS
  2. SA-MONEY
  3. Installation

Add new currency

Installation for SA-Money script (Adding new currency)

This works only like item as money. That means to add or remove the money you have to edit scripts that use that.

Example

From

Player.Functions.RemoveMoney('cash', amount, "Bank deposit")

To

Player.Functions.RemoveMoney('blackmoney', amount, "Bank deposit")

  • 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

config.lua
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

items.lua
	['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

config.lua

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 11 months ago

If you get some errors in the console, try the section

📦
💸
⚙️
⚙️
Error Fixes