I have a modding related question :
I’m making an inventory system, and the inventory is stored in cg.predictedPlayerstate (.inventory, int inventory[16]).
I would like to access this from my inventory screen, which is a classic UI screen.
I’ve seen some tools to get some Cvars values, but I haven’t found anything that looks in the cg structure.
You cannot access it directly. (Certainly not with qvms, or without serious modifications to how cgame and ui are handled in the engine) You will have to send the data somehow. EG cvars or trap_SendServerCommand with sv_floodProtect 0.
If you are using the Team Arena menu (code/ui) as opposed to (code/q3_ui) code, you may be able to have the menu handling in cgame as well.