There aren't many native functions for what the script can do, if anyone has any better ideas
- go to `itemcontrol.lua`
- search `ESX` and tell me what could be done better/right
Realised it wasn't doing the math to take the correct amount of required items, so this fixes it
also if `SingleProgress` is enabled, it won't show the "Ingredient Progress bars" any more
This is a continuation from an earlier commit
- If something is attempted to be opened without correctly registered coordinates, (most likely being called outside the script), refuse it
- If the player isn't close enough to the registered coords, refuse it
Basically, built-in distance based exploit protection for shops/stashes/sellShops
These currently work as intended, but can't put in place yet because my scripts don't fully support it yet. But the base is there for it
Also slip in `bannedItems` table so players can't the abuse sell items function to spawn cash
This removes redundant inventory files and compiles all of the functions into one
This allows easier editing and control per inventory and hopefully better optimization, readability and easier addition of support for new inventories
using the function to grab slot info, this can now check if you have enough inventory slots for items to be given, allowing it to check before TRYING to add them
Moves Auth Token stuff to separate file because it doesn't really need to be in `itemcontrol.lua`
Helps me keep track of it better too
Also added a "cooldown" to workaround people's multicharacter scripts claiming the players loaded more than once and breaking it
Custom inventories apparently load items separately/later into qbshared
so the script starts thinking there is definitely 0 items but its checking too early, this forces it to wait until its available to continue
PS-Inv used to be exactly the same as QB-Inv so alot of the function calls were shared
This separates them and makes it easier to make changes to support their inventory
Also unified the calls for server side functions into single functions instead of having separate per inventory
Also moves:
- `invImg()` to inventories.lua
- `registerStash()` to stashcontrol.lua
This has several changes
When crafting, it now checks if the inventory is open and stops crafting dead and warns the player with a print.
Multicraft now checks if you have space in your inventory for the items and limits the max amount craftable
Also fixes the "title" of the qb-input box when crafting
Also changed the anim flag for the "placing items" to hopefully keep you in place