• Player is holding down the button
    2 replies, posted
Hey How do i check if the player is holding down a button. Like the keypadcracker in darkrp, only keeps going if the button is pressed down.
[img]http://wiki.garrysmod.com/favicon.ico[/img] [url=http://wiki.garrysmod.com/page/input/IsKeyDown]input.IsKeyDown[/url]
input.IsKeyDown is fine but please don't spam calls to it. A better alternative is to use the hook system. [img]http://wiki.garrysmod.com/favicon.ico[/img] [url=http://wiki.garrysmod.com/page/GM/KeyPress]GM/KeyPress[/url] and [img]http://wiki.garrysmod.com/favicon.ico[/img] [url=http://wiki.garrysmod.com/page/GM/KeyRelease]GM/KeyRelease[/url]
Sorry, you need to Log In to post a reply to this thread.