Hey ! I would like to know if it's possible to know when the player open her inventory. Thanks you.
Edit: Sorry, i've found a solution with the forum search. Thanks.
Solved Checking when a player opens inventory?
Discussion in 'Rust Development' started by UnderFawkes, Aug 13, 2015.
-
Code:
input.IsDown(BUTTON.INVENTORY);
Code:input.WasJustPressed(BUTTON.INVENTORY)
-
Sorry for Wrong section. I don't see where i can move my thread. And Thanks for your reply.
[DOUBLEPOST=1439481697,1439453521][/DOUBLEPOST]With this method, i don't know when the player close her inventory, if he use ESCAPE or other.. It's not the good solution. -
-
-
Code:private void OnTick() { foreach (var player in BasePlayer.activePlayerList) // Just as example of course, should be replaced by a specific player list as you don't want to loop every player here. { if (!player.inventory.loot.IsLooting()) { // Inventory closed } } }
-
-
-
Using OnTick should be really used to the minimum ^^
-