qbcore-framework / qb-inventory

Slot Based Inventory System Used With QB-Core :school_satchel:
GNU General Public License v3.0
51 stars 370 forks source link

[SUGGESTION] #467

Closed ReNsTeR501 closed 4 months ago

ReNsTeR501 commented 8 months ago

The problem

Greetings guys, quick enhancement question for you, i'd like to see a setting in config to hard set marked bills to a single value, this should allow them to stack without any issue. ty

Ideal solution

right now, marked bill dont stack due to the values of each being different, if it could just be hard set to a single value via the config, people can decide which they prefer :)

Alternative solutions

no alternative soluteion

Additional context

No response

citRaTTV commented 7 months ago

You can accomplish this by setting unique = false in your items.lua file in qb-core. IE change:

    markedbills                  = { name = 'markedbills', label = 'Marked Money', weight = 1000, type = 'item', image = 'markedbills.png', unique = true, useable = false, shouldClose = true, combinable = nil, description = 'Money?' },

to

    markedbills                  = { name = 'markedbills', label = 'Marked Money', weight = 1000, type = 'item', image = 'markedbills.png', unique = false, useable = false, shouldClose = true, combinable = nil, description = 'Money?' },
ReNsTeR501 commented 7 months ago

niceeeeee, ty for letting me know.

AngryMaximus commented 6 months ago

You can accomplish this by setting unique = false in your items.lua file in qb-core. IE change:

    markedbills                  = { name = 'markedbills', label = 'Marked Money', weight = 1000, type = 'item', image = 'markedbills.png', unique = true, useable = false, shouldClose = true, combinable = nil, description = 'Money?' },

to

    markedbills                  = { name = 'markedbills', label = 'Marked Money', weight = 1000, type = 'item', image = 'markedbills.png', unique = false, useable = false, shouldClose = true, combinable = nil, description = 'Money?' },

This won't work considering marked bills are nested with meta data, the price / value of the marked bills will only ever be the last marked bill you got.

citRaTTV commented 6 months ago

You can accomplish this by setting unique = false in your items.lua file in qb-core. IE change:

    markedbills                  = { name = 'markedbills', label = 'Marked Money', weight = 1000, type = 'item', image = 'markedbills.png', unique = true, useable = false, shouldClose = true, combinable = nil, description = 'Money?' },

to

    markedbills                  = { name = 'markedbills', label = 'Marked Money', weight = 1000, type = 'item', image = 'markedbills.png', unique = false, useable = false, shouldClose = true, combinable = nil, description = 'Money?' },

This won't work considering marked bills are nested with meta data, the price / value of the marked bills will only ever be the last marked bill you got.

That's true, you'd have to adapt your scripts to not do that if you just want them to be a single item with a persistent value

github-actions[bot] commented 4 months ago

This issue has had 60 days of inactivity & will close within 7 days