qb-core
qb-core copied to clipboard
Remove inventory code from the core
Describe Pull request This removes all inventory code from the core and changes it to the code that is handled by the inventory instead,I have tested this but probably not thorougly enough, so please test this if you come across this.
This also adds the QBCore:Server:PlayerUnloaded event to be the same as the QBCore:Server:PlayerLoaded event but for logging out. But instead of sending player data, it sends source as the playerdata is not loaded at that point anymore.
Questions (please complete the following information):
- Have you personally loaded this code into an updated qbcore project and checked all it's functionality? [yes] (Be honest)
- Does your code fit the style guidelines? [yes]
- Does your PR fit the contribution guidelines? [yes]
Receiving a "No Such Export CreateUsableItem" error
You need to make sure qb-inventory exclusively starts after qb-core
I can confirm QB-Core is started before QB-Inventory
That's not what I meant
I meant qb-inventory needs to start right after qb-core
It is working now, thank you!
Please do test it thorougly if you can, if you have any more issues, please come here so I can fix them or help you fix them
Here is an additional error located
Alright, I'll take a look tomorrow
Fixed the issue in the qb-inventory PR
Good job that did correct that error! A server side error has now presented itself. When I go to use an item such as wash money the message I receive is "You have no marked money" which I do. I think this could be related the "CreateUsableItem" function or the "GetItem" function as it seems it can't find or "get" the item.
No it's actually because that's one of the functions without backwards compatibility, you'd just need to change QBCore.Player.GetSlotsByItem
to exports['qb-inventory']:GetSlotsByItem
to fix it
@Lavarris has everything been good so far? No issues anymore?
The only real issue we are having is with encrypted scripts we have purchased. We can't seem to change the natives to updated exports you created. Anyway to make this in some way backwards compatible for that reason?
I'll add it later
That last commit is meant to be named SetField and SetMethod
Thanks for the update, the character selection screen within qb-mulitcharacters is not displaying. No errors are presented in the server console or client console.