greentumbleweed Posted January 26, 2019 Share Posted January 26, 2019 local weap = {shot=false,timer=false} addEventHandler("onClientPlayerWeaponFire", localPlayer, function() local rot = getPedCameraRotation(localPlayer) if (isTimer(weap.timer)) then killTimer(weap.timer); end if (not weap.shot) then setPedCameraRotation(localPlayer, -(rot-0.9)) weap.shot = true weap.timer = setTimer(setPedCameraRotation, 100, 1, localPlayer, -(rot+0.09)) else setPedCameraRotation(localPlayer, -(rot+0.9)) weap.shot = false weap.timer = setTimer(setPedCameraRotation, 100, 1, localPlayer, -(rot-0.09)) end end) how can i make the snap of rotation a bit smoother less fast yet still function properly? also is there a way to make vertical recoil with setPedCameraRotation? 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