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