How to Change the Black Money Name
How to Customize the Black Money Name (Old & New Script Versions)
In our scripts, black money is typically referred to as markedbills. However, you can easily rename it to black_money, dirtymoney, or anything else depending on your framework or preference. This guide walks you through the customization steps for both old and new script versions, including examples for QBCore and ESX frameworks.
Newer Scripts
In newer versions of our scripts, black money behavior is centralized in configuration and logic files such as shared/config.lua and editable_server.lua.
Step 1: Configure shared/config.lua
shared/config.luaNavigate to shared/config.lua and locate the following configuration block:
lConfig.moneyOptions = {
blackMoney = false,
blackMoneyName = "markedbills", -- if you are using ESX use "black_money", for QBCore use "markedbills"
blackMoneyIsItem = true,
useMetadataForBlackMoney = true,
moneyName = "money",
moneyIsItem = false,
}Edit the following keys:
blackMoneyName: Change this to"black_money","dirtymoney", or your preferred name.blackMoneyIsItem: Set tofalseif you're using an account-based system (like ESX), ortrueif it's an item (like QBCore).useMetadataForBlackMoney: Set totrueonly if you're using metadata-based tracking.
Step 2: Update Logic in editable_server.lua
editable_server.luaLocate and modify the addBlackMoney function. Below are examples for both frameworks:
QBCore Example
self.addBlackMoney = function(amount)
Player.Functions.AddItem('black_money', amount)
endESX Example
self.addBlackMoney = function(amount)
return Player.addAccountMoney("black_money", amount)
end💡 Make sure the blackMoney-related config options match the logic used here (item vs. account).
Older Scripts
In older versions, black money handling is directly embedded inside the server.lua file.
Step 1: Open server.lua
server.luaOpen your older script folder and locate server.lua.
Step 2: QBCore Integration
Search for code that looks like this:
local info = {
worth = count
}
player.Functions.AddItem('markedbills', 1, false, info)
TriggerClientEvent('inventory:client:ItemBox', src, QBCore.Shared.Items['markedbills'], "add")Replace with:
player.Functions.AddItem('black_money', count)🧹 You can remove the
infotable andTriggerClientEventline if you’re not using metadata or item boxes.
Step 3: ESX Integration
Search for:
Player.addAccountMoney("black_money", count)If you want to rename black_money to something else (e.g., dirtymoney), simply update this line:
Player.addAccountMoney("dirtymoney", count)Be sure to use this name consistently across all functions and config files.
Final Checklist
🔁 Restart your server after making changes.
🧪 Test black money creation (e.g., drug sale or robbery reward).
📦 Ensure the new item or account name is recognized in your inventory or UI.
🗂 Use consistent naming across all scripts, configs, and notifications.
🛠 Troubleshooting
Black money not updating
Check all instances where the original name was used.
Inventory errors
Make sure blackMoneyIsItem and blackMoneyName are properly set.
Console warnings
Verify syntax and correct function usage per your framework.
Last updated