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
When a player logs out and back in (switches character) it was thinking that the `AuthEvent` was being called more than once, triggering a warning message
This should clear the event when a player unloads and then allows them to request a new one
The slot data for CodeM apparently returns as a string, this fixes it trying to compare a string to a number
```lua
if v.name == item and v.slot <= lowestSlot then
```
to
```lua
if v.name == item and tonumber(v.slot) <= lowestSlot then
```
Nothing public uses this yet, but its very similar to QBCore which makes it very for me to support
Nothing special to note, just improves the integration for future ventures into RedM