ronaldoguedess Posted April 18, 2018 Posted April 18, 2018 (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 April 18, 2018 by ronaldoguedess AGUARDEM: NOVO MTA DAYZ (TWD 98% Traduzido) VER: 1.9 Esta chegando!! Muitas Novidades Revolucionárias! (Maio 2018)
AHMED MOSTAFA Posted April 19, 2018 Posted April 19, 2018 Try this "onClientKey" cancelEvent 1 April 25, 2016, THE BEGINNING OF MY JOURNEY Check my apps in playStore
LilDawage Posted April 19, 2018 Posted April 19, 2018 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
ronaldoguedess Posted April 19, 2018 Author Posted April 19, 2018 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) 1 AGUARDEM: NOVO MTA DAYZ (TWD 98% Traduzido) VER: 1.9 Esta chegando!! Muitas Novidades Revolucionárias! (Maio 2018)
MIKI785 Posted April 19, 2018 Posted April 19, 2018 Do you want to forbid people from using the 'fire' control? Either by mouse button or ctrl? Because players could simply rebind that action to eg. ALT and they will be able to 'fire' again. 1 Lua Scripter Owner of mshost.cz MTA portal.
AHMED MOSTAFA Posted April 19, 2018 Posted April 19, 2018 @MIKI785 is right toggleControl https://wiki.multitheftauto.com/wiki/Control_names I think u will use "fire" not "action" April 25, 2016, THE BEGINNING OF MY JOURNEY Check my apps in playStore
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