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.lua
Navigate to shared/config.lua
and locate the following configuration block:
Edit the following keys:
blackMoneyName
: Change this to"black_money"
,"dirtymoney"
, or your preferred name.blackMoneyIsItem
: Set tofalse
if you're using an account-based system (like ESX), ortrue
if it's an item (like QBCore).useMetadataForBlackMoney
: Set totrue
only if you're using metadata-based tracking.
Step 2: Update Logic in editable_server.lua
editable_server.lua
Locate and modify the addBlackMoney
function. Below are examples for both frameworks:
QBCore Example
ESX Example
π‘ 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.lua
Open your older script folder and locate server.lua
.
Step 2: QBCore Integration
Search for code that looks like this:
Replace with:
π§Ή You can remove the
info
table andTriggerClientEvent
line if youβre not using metadata or item boxes.
Step 3: ESX Integration
Search for:
If you want to rename black_money
to something else (e.g., dirtymoney
), simply update this line:
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