Disabling player angles based on mouse movement

Hello. Since player.Spectate doesn’t allow spectating self, I am trying to make a 3rd person camera that obviously spectates self. I have a problem, though. I’ve managed to get the camera working, but I want to make so that the player can’t rotate (change eye angles) when he moves the mouse. I maybe missing something here, maybe you guys can help me find it … Example: Jockey third person camera from L4D2. Jockey gets on your head, but you can only rotate the camera around you, not the yourself along with the camera. Thanks in advance…

[lua]hook.Add(“CreateMove” , “StopEyeAngles” function(ucmd) ucmd:SetViewAngles(LocalPlayer():EyeAngles()) end )[/lua]


There’s probably a better way.