Jump to content

Punch Hand


Oussema

Recommended Posts

Posted
function disablePunch()
if getPedWeapon(source) == 0 then
toggleControl(source,"fire",false)
else
toggleControl(source,"fire",true)
end
end

Try this
 

Posted
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

Posted
addEventHandler ( 'onPlayerWeaponSwitch', getRootElement ( ),
function ( cc,bb )
if bb == 0 or bb == 1 then
toggleControl (source, 'fire', false)
else
toggleControl (source, 'fire', true)
end
end
)

 

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