# Add new currency

{% hint style="info" %}
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*&#x20;

<pre><code><strong>Player.Functions.RemoveMoney('cash', amount, "Bank deposit")
</strong></code></pre>

*To*

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

{% endhint %}

* If you have successfully installed the script, then you can add new currency by these steps

{% hint style="danger" %}
More currencies = bigger impact on performance
{% endhint %}

* First of all, we need to config your config.lua in SA-Money-v2

{% code title="config.lua" %}

```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)
        }, ]]
    }
}
```

{% endcode %}

* Now, we have to create an item in qb-core > shared > items.lua same way as you added cash

{% code title="items.lua" lineNumbers="true" %}

```lua
	['black'] 						 = {['name'] = 'black', 					  	  	['label'] = 'Black Money', 			['weight'] = 0, 		['type'] = 'item', 		['image'] = 'cash.png', 			['unique'] = false, 		['useable'] = false, 	['shouldClose'] = true,	   ['combinable'] = nil,   ['description'] = 'Money?'},
```

{% endcode %}

* The next step is to add new currency into the config.lua in QB-Core

{% code title="config.lua" %}

```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
```

{% endcode %}

Now it's done and it should work. If it doesn't work try other tips or contact us on Discord

{% hint style="info" %}
If you get some errors in the console, try the section [Error Fixes](/studio-players/faq/sa-money-v2.md)
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://studio-players.gitbook.io/studio-players/qb-qbx-scripts/sa-money/installation/add-new-currency.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
