It'd be pretty neat, otherwise I'll have to rethink an idea x)
Solved Can I know if a person is pressing a specific key?
Discussion in 'Rust Development' started by MoshMage, Nov 28, 2015.
-
Yeah you can use the hook OnPlayerInput.
OnPlayerInput(BasePlayer player, InputState input) -
Wulf Community Admin
Note: You can only listen for keys that are sent to the server, aka the existing keybinds.
-
(and let me hijack my own thread) can I spawn a living person ? (admin, to test damage and wtv) -
Wulf Community Admin
-
They'll add the console command "bind" -
-
Wulf Community Admin
-
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 }
-