1. It'd be pretty neat, otherwise I'll have to rethink an idea x)
     
  2. Yeah you can use the hook OnPlayerInput.

    OnPlayerInput(BasePlayer player, InputState input)
     
  3. Wulf

    Wulf Community Admin

    Note: You can only listen for keys that are sent to the server, aka the existing keybinds.
     
  4. meaning users would have to bind the key with X command ? so.. I can't, for instance, make a "hold" command?

    (and let me hijack my own thread) can I spawn a living person ? (admin, to test damage and wtv)
     
  5. Wulf

    Wulf Community Admin

    You can't make your own keybinds, you can only listen for input of existing controls from players. For "players", look at the NPC plugin.
     
  6. You can make new Keybinds with the next update (next Thursday).
    They'll add the console command "bind"
     
  7. thought I doubt I'll be able to make a "is holding this key" with a bind command :)
     
  8. Wulf

    Wulf Community Admin

    You can check their input of existing controls if they are down or not, as long as they are sent to the server.
     
  9. this is the list of available buttons using OnPlayerInput
    Code:
    public enum BUTTON
    {
        MAP = 1,
        FORWARD = 2,
        BACKWARD = 4,
        LEFT = 8,
        RIGHT = 16,
        JUMP = 32,
        DUCK = 64,
        SPRINT = 128,
        USE = 256,
        INVENTORY = 512,
        FIRE_PRIMARY = 1024,
        FIRE_SECONDARY = 2048,
        CHAT = 4096,
        RELOAD = 8192,
        VOICECHAT = 16384,
        NEXT = 65536,
        PREVIOUS = 131072,
        SLOT1 = 262144,
        SLOT2 = 524288,
        SLOT3 = 1048576,
        SLOT4 = 2097152,
        SLOT5 = 4194304,
        SLOT6 = 8388608,
        SLOT7 = 16777216,
        SLOT8 = 33554432,
        LOOK_ALT = 67108864,
        FIRE_THIRD = 134217728
    }
     
  10. You are a gentleman and a scholar!