ox_inventory icon indicating copy to clipboard operation
ox_inventory copied to clipboard

buyItem hook without can afford check

Open Skryptific opened this issue 1 year ago • 0 comments

Is your feature request related to a problem? Please describe. I am using the buyItem hook to create wholesale orders which then, after some time, get added to a certain stash. Players with certain permissions can purchase items through the shops ui and in the hook I am removing the money from the group account and return false eventually. The problem I am facing is that you need the required amount of money in your inventory before the buyItem hook triggers.

Describe the solution you'd like Moving the canAfford functionality after the buyItem hook. Not sure if things will break due to the complexity, hence the question first.

Describe alternatives you've considered Just letting it be, forcing players to use money instead of an account. Or telling them to have it in their inventory, but not an ideal solution.

Skryptific avatar Sep 25 '24 10:09 Skryptific