#RooTs Posted June 20, 2016 Share Posted June 20, 2016 I want to set an element when I press 2 buttons. (W + space) if I just press "W". it will not turn on, and I shake, "w" + "space" it activates I thought about it, would work ? if getKeyState( "w" ) and getKeyState( "space" ) then Link to comment
KariiiM Posted June 20, 2016 Share Posted June 20, 2016 I do it like that, bindKey ( "w", "down", function ( ) if getKeyState ( "space" ) then -- your code end end ) bindKey ( "space", "down", function ( ) if getKeyState ( "w" ) then -- your code end end ) Link to comment
#RooTs Posted June 20, 2016 Author Share Posted June 20, 2016 I do it like that, bindKey ( "w", "down", function ( ) if getKeyState ( "space" ) then -- your code end end ) bindKey ( "space", "down", function ( ) if getKeyState ( "w" ) then -- your code end end ) getKeyState It works on 2 sides? client and server side ? I want to know if it works in server.lua or client.lua Link to comment
#RooTs Posted June 20, 2016 Author Share Posted June 20, 2016 Client side only GetKeyState is clientSide ? okay @KariiiM, thanks. Link to comment
Dealman Posted June 20, 2016 Share Posted June 20, 2016 Of course it's client-sided only, a server (usually) wouldn't have a keyboard. Link to comment
KariiiM Posted June 20, 2016 Share Posted June 20, 2016 Of course it's client-sided only, a server (usually) wouldn't have a keyboard. And logically the server has no keyboard to type on it Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now