46
Modification Help / Inventory Bug
« on: February 05, 2011, 05:29:19 PM »
I have been frustrated recently when I try to run the following test.
This always default to true if the player has not opened his/her inventory yet since their player has spawned. After opening the inventory, it works fine, but I need a way to check if the player has opened their inventory since they have spawned.
Two possible solutions I see is by commanding the players to open/close their inventories when they spawn, but I do not know the commandToClient to do that, or I can find the function for opening the inventory, and when it is called set a client variable to true/false, so I know when it has been called.
What is the command to toggle your inventory?
Code: [Select]
if(%player.currTool > -1)
This always default to true if the player has not opened his/her inventory yet since their player has spawned. After opening the inventory, it works fine, but I need a way to check if the player has opened their inventory since they have spawned.
Two possible solutions I see is by commanding the players to open/close their inventories when they spawn, but I do not know the commandToClient to do that, or I can find the function for opening the inventory, and when it is called set a client variable to true/false, so I know when it has been called.
What is the command to toggle your inventory?