Hello!
While this feature is baked into some resources, I got tired of the ones that didn’t offer it leaving behind stacks of marked bills that filled up players’ inventories.
Drag this into your QB folder and use /combinebills to combine the worth metadata of all markedbills in a player’s inventory.
|
|
Code is accessible |
Yes |
Subscription-based |
No |
Lines (approximately) |
80 |
Requirements |
qb-core, qb-inventory, progressbars |
Support |
No |
3 Likes
Or just make dirty money an item SOLVED
3 Likes
Marked bills are an item in this scenario. They must be kept as unique items to handle the worth metadata correctly. Treating them as non-unique items will allow them to stack, but does not handle worth correctly. This script is the only real solution I have found for this problem.
2 Likes
Works for me what do you need meta data on money for?
1 Like
Worth metadata, each markedbills item contains metadata for what that item is worth. If you attempt to make them non unique and stack them, the item stacked on top overwrites the worth value for all items in the stack.
For example I have 2 markedbills, one is worth $500 the other is worth $1000. When stacked, the bill being placed on top will overwrite all items in the stack. In this scenario you could stack $1000 on top of $500 and split back into 2 items worth $1000 each resulting in a money exploit.
You could strip out worth data and make each markedbill worth $1 and award x amount of markedbills to achieve the desired $ amount (similar to casino chips), but not everyone uses it this way.
I understand what you’re saying Best way to go about it meta on money just dosent make practical sense a dollar is 1 period easiest way
I did the same!! so much easier
I am having the issue of the marked bills saying undefined, not giving a value. Someone know how to fix this issue ?
Outstanding, however there is one flaw mate. When using the command ‘qb-combinebills’ it automatically goes into your 1st slot deleting whatever item was there to start with. People have lost their phones, weapons due to it. Is there a way around it?
markedbills = { name = 'markedbills', label = 'Marked Bills', weight = 10, type = 'item', image = 'markedbills.png', unique = true, useable = true, shouldClose = false, combinable = nil, description = 'Markedbills' },
Make sure it’s set to this in your item.lua
I’ve fixed your script. Where yours would replace quickslot 1 and delete the items in that slot, this now picks the first empty slot and places the bills into that slot. 
Link to fix: https://drive.google.com/file/d/1TtfIH6xgN4GdcU5QQHIKOVXipjGCVH4s/view?usp=sharing
I’ll also add here another link once I’ve tested it for a version that only allows the player to hold 25k markedbills per slot once combined, Just testing now.
UPDATE. This version allows you to have 25k per slot and moves the remainder into another slot: https://drive.google.com/file/d/1GZmqEKFfxL8EOnp1wF6AUIK2nnWlvwIu/view?usp=sharing
Once you’ve downloaded and updated yours let me know and I’ll remove this links 