SherlocK Posted November 13, 2019 Share Posted November 13, 2019 Estou tentando fazer um script de recuo que funcione de forma mais realista mexendo o eixo Z também, porém da forma que tentei fazer não funcionou, se alguém puder me dar uma ajuda fico grato. 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 setCameraMatrix (x, y-0.2, z+0.3, lx, ly, lz) setCameraTarget ( localPlayer ) weap.shot = true weap.timer = setTimer(setPedCameraRotation, 50, 1, localPlayer, -(rot+0.28)) else setCameraMatrix (x, y+0.2, z+0.3, lx, ly, lz) setCameraTarget ( localPlayer ) weap.shot = false weap.timer = setTimer(setPedCameraRotation, 50, 1, localPlayer, -(rot-0.28)) 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