[MTA]revenngeR Posted October 21, 2010 Share Posted October 21, 2010 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
eAi Posted October 21, 2010 Share Posted October 21, 2010 As the wiki says, this function does not work on local players: https://wiki.multitheftauto.com/wiki/SetPedAimTarget This is because the aim on local players is tied to the camera position, as such what you really want is to move the camera, not the aim. I don't think we have a specific way to do this at the moment. Link to comment
[MTA]revenngeR Posted October 21, 2010 Author Share Posted October 21, 2010 Thanks for the answer. I hope that there will be a function like that in future.. Best Regards, ArmyOfTwo 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