Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat: Stash with Unlimited Weight or Automatic Clear #1694

Open
Legacy-TacticalGamingInteractive opened this issue May 11, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@Legacy-TacticalGamingInteractive
Copy link

Legacy-TacticalGamingInteractive commented May 11, 2024

Is your feature request related to a problem? Please describe.
I have pawn shops in game which are essentially stashes that are public - basically people come to it and sell items to it. I have it working fine. However it keeps going over weight within 24 hours because of how many people are using it - even with max weight allowed at 999kg.

Describe the solution you'd like
• Either an export to automatically clear the specific stash id items (on automatic txAdmin restart)

or

• Some way, if possible, to make it have unlimited weight for that stash id?

Describe alternatives you've considered
Messin around with exports.ox_inventory:SetDurability of items in the stash but could not figure out how nor how to implement exports.ox_inventory:ClearInventory in this way.

Additional context
Export that I could run in the pawn shop script that will clear the shops weight/items each night. (I txAdmin restart automatically once every 24hrs)


-- Event handler to clear stashes on server shutdown/restart
AddEventHandler('txAdmin:events:serverShuttingDown', function()
    for shopId, _ in pairs(Config.Shops) do
        exports.ox_inventory:ClearInventory(shopId)
    end
end)

I couldn't get this to work for some reason.

@Legacy-TacticalGamingInteractive Legacy-TacticalGamingInteractive added the enhancement New feature or request label May 11, 2024
@CeebDev
Copy link
Contributor

CeebDev commented May 19, 2024

Just clear them at start of server instead of shutting down ? Btw you need to register them before to be able to clear them

If you need help on ox stuff you should ask in discord instead of GH issue

@Legacy-TacticalGamingInteractive
Copy link
Author

Just clear them at start of server instead of shutting down ? Btw you need to register them before to be able to clear them

If you need help on ox stuff you should ask in discord instead of GH issue

Ty for tip I didnt think about trying it at startup instead so maybe that will work better

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants