Is there a "command" to make a player simulate a keypress?
like this:
ply:PressKey("KEY_NONE,KEY_FIRST")
I think you need to do it in [img]http://wiki.garrysmod.com/favicon.ico[/img] [url=http://wiki.garrysmod.com/page/GM/SetupMove]GM:SetupMove[/url], but what are you actually trying to do? There might be a better way.
[code]input.IsKeyDown( number key )[/code]
[url]https://wiki.garrysmod.com/page/Enums/KEY[/url] <- use the decimal values from here to determine if the correct key is pressed.
Wiki: [url]https://wiki.garrysmod.com/page/input/IsKeyDown[/url]
If this is too hard, i recommend you to recreate the actions more than inputs
cmd:SetButtons(KEY_?/IN_?)
I'm not sure if when you do that it's recognized by input.IsKeyDown or KeyPressed.
Im trying to make a towtruck that has buttons to "effect" the winch on it
[editline]21st November 2016[/editline]
[QUOTE=gonzalolog;51405521]If this is too hard, i recommend you to recreate the actions more than inputs[/QUOTE]
What you mean with "actions"?
[editline]21st November 2016[/editline]
[QUOTE=NeatNit;51405376]I think you need to do it in [img]http://wiki.garrysmod.com/favicon.ico[/img] [url=http://wiki.garrysmod.com/page/GM/SetupMove]GM:SetupMove[/url], but what are you actually trying to do? There might be a better way.[/QUOTE]
Im trying to make a towtruck that has buttons to "effect" the winch on it
Don't overcomplicate it, see winch tool and see how does it manages winch
Winch tool?
And by the way, shouldn't it work if i make the tow truck use a command?
Sorry, you need to Log In to post a reply to this thread.