So I have been working on a new fiveM server and I have had this problem with the inventory where it opens and then when I close it does not leave the mouse control format. I will leave a link to what HUD I use and a video of the problem if anyone could tell me how to fix it that would be amazing.
To be honest, I’m not sure what to be looking for I am pretty brand new to this but I did a control F search through some of the main code and did not find what you were asking for I linked the script if you could look through it if not that’s fine.
In the main.lua inside the client script there is a functioncloseInventory()
You can try placing a print above the line SetNuiFocus(false, false) to check if the code reaches that. Im cannot test things by my self because I need to setup a complete esx server for that. Dont have time for that XD
If that still doesn’t fix it, keep the code replaced but instead of closeInventory() add $.post("http://conde-b1g_inventory/NUIFocusOff", JSON.stringify({}));
And if all else fails check your client and server console for errors, then reply back with anything you may find.