Jump to content

weapon recoil


Recommended Posts

  
function RecoilFunc(weapon, ammo, ammoInClip, hitX, hitY, hitZ, hitElement) 
    local x, y, z = getPedTargetEnd ( source ) 
    setPedAimTarget (source, x+1,y+5,z+5 ) 
    outputChatBox ( "X " .. x .. " Y " .. y .. " Z ".. z .."" ) 
end 
  
addEventHandler("onClientPlayerWeaponFire", root, RecoilFunc) 
  

i tried to create weapon recoil with this, but the setPedAimTarget won't work on local players but it only works for remote players, any ideas?

Link to comment

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