Oussema Posted April 2, 2017 Share Posted April 2, 2017 Is there way to disable Punch Hand ? i won't disable damage i want make the player can't Punch Hand Link to comment
Mr.Loki Posted April 2, 2017 Share Posted April 2, 2017 onPlayerWeaponSwitch if getPedweapon = 0 toggleControl fire to false else toggleControl fire to true Link to comment
Function Posted April 3, 2017 Share Posted April 3, 2017 function disablePunch() if getPedWeapon(source) == 0 then toggleControl(source,"fire",false) else toggleControl(source,"fire",true) end end Try this Link to comment
Function Posted April 3, 2017 Share Posted April 3, 2017 function disablePunch() for _,player in ipairs(getElementsByType("player")) do if getPedWeapon(player) == 0 then toggleControl(player,"fire",false) else toggleControl(player,"fire",true) end end end setTimer(disablePunch,50,0) This is 100% working Link to comment
AE. Posted April 3, 2017 Share Posted April 3, 2017 addEventHandler ( 'onPlayerWeaponSwitch', getRootElement ( ), function ( cc,bb ) if bb == 0 or bb == 1 then toggleControl (source, 'fire', false) else toggleControl (source, 'fire', true) end end ) 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