Jump to content

(help) press 2 button


#RooTs

Recommended Posts

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

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
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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...