Buffalo Posted August 12, 2012 Share Posted August 12, 2012 Is it possible to detect remote players head detection prescisely client side only? Local player is piece of cake tho. Something i tried but works only partially. addEventHandler ( "onClientRender", root, function() for i, player in ipairs ( getElementsByType ( "player", root,true ) ) do local x,y,z if getPedTask(player,'primary',5) == 'TASK_SIMPLE_USE_GUN' then x,y,z = getPedTargetEnd(player) else x,y,z = getElementPosition(player) local rot = getPedCameraRotation ( player ) x = x + math.sin ( math.rad ( rot ) ) * 3 y = y + math.cos ( math.rad ( rot ) ) * 3 end setPedLookAt ( player, x, y, z ) 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