Jump to content

How to Disable "CTRL" Key ?


Recommended Posts

Posted (edited)

I don't want the player take a punch! 


I need disable "CTRL" key for impeding that player take a punch.

 

I try this:

 toggleControl ( source, "fire", false )

but only disable mouse key fire... and doesn't disable the "CTRL" key fire ... 

Edited by ronaldoguedess

AGUARDEM: NOVO MTA DAYZ (TWD 98% Traduzido) VER: 1.9 Esta chegando!!

Muitas Novidades Revolucionárias! (Maio 2018)

Posted

toggleControl('action',false) , use it

RPG/CnR servers Developer , You want help ? contact me on discord >>>lilDawage#8508<<< i'm at your Service 10/24 hours 7/7 days , >>>Welcome<<<

Asking Discord Channel JOIN US ON here , you are welcome 10/24 active

Posted
4 hours ago, LilDawage said:

toggleControl('action',false) , use it

I did have tried that, but this only disable mouse key fire... and doesn't disable the "CTRL" key fire

6 hours ago, XaskeL said:

toggleControl('action',false)

I did have tried that, but this only disable mouse key fire... and doesn't disable the "CTRL" key fire

10 hours ago, killerProject said:

Try this


"onClientKey"

cancelEvent

 

Thanks Man!
It's Works now!

function playerPressedKey(button, press)
    if (press) then 
        if button == "lctrl" or button == "rctrl"  then 
            cancelEvent()     
            return true 
        end
    end
end
addEventHandler("onClientKey", root, playerPressedKey)

 

AGUARDEM: NOVO MTA DAYZ (TWD 98% Traduzido) VER: 1.9 Esta chegando!!

Muitas Novidades Revolucionárias! (Maio 2018)

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