Binds

Is there anyway to detect (preferably a function or method) a command bind, such as toggleInventoryHud?

Comments

  • Is there anyway to detect (preferably a function or method) a command bind, such as toggleInventoryHud?
    I don't quite understand. Are you trying to 'hook' into the function?
  • edited December 2009
    Okay, say I have this new inventory screen and it works fine and everything, how can I detect which bind the client(this is a client-side detection of course) is using for toggleInventoryHud (default numpadenter). This way I can change it when a specific event has occurred and when they hit the inventory hud bind they get mine. I know I could simply block toggleInventoryHud and make a temporary action map with a new bind, but I don't want people to have to try and figure out where the inventory bind is if it's not what they are used to.


    EDIT:
    Nevermind >.>
  • package SUPER_NIFTY
    {
        function toggleInventoryHud(%v)
        {
            if (!%v)
                return;
    
            if (SOME_CONDITION_MET)
                showMyNiftyHud();
            else
                parent::toggleInventoryHud(%v);
        }
    };
    if (!isActivePackage(SUPER_NIFTY))
        activatePackage(SUPER_NIFTY);
    
  • I guess that does make more sense to do...and is probably easier.....

    Thanks :D
Sign In or Register to comment.