1. So unfortunately it seems like detecting if the inventory - button is pressed is no longer possible, or am I missing something?
     
  2. Care to give an example on how I would use that to detect if the inventory - button was pressed? I'm kind of lost on how to approach this.
     
  3. You can bind your commands...
     
  4. Sorry but I'm still lost...
     
  5. I tryed to bind them, but they dont work with plugins commands..
     
  6. Wulf

    Wulf Community Admin

    They'd work with console commands only, not chat commands.
     
  7. So how exactly would I detect if the inventory - button is pressed? I still can't think of a solution...
    [DOUBLEPOST=1449192087][/DOUBLEPOST]So I came up with the following:
    Code:
    void OnPlayerInit(BasePlayer player)
    {
        ConsoleSystem.SendClientCommand(player.net.connection, "bind tab inventory.toggle;killfeed.inventory");
    }[ConsoleCommand("killfeed.inventory")]
    private void SaveCommand(ConsoleSystem.Arg arg)
    {
        Puts("tab pressed");
    }
    It works like a charm, though I'm not sure if you can bind the inventory - button itself to something, so I guess you need to just assume the player is using one specific button to open his inventory.

    Seems clunky at first, but opens up a lot of possibilities!

    Edit 1#: I guess it could lead to console command conflicts if different plugins define the same console command.
     
    Last edited by a moderator: Dec 4, 2015