Local Player camera flip.

Posts 1–11 of 11 · Page 1 of 1
Local Player camera flip.
I want to make fun of my friends, flip the camera. How can you do such a thing?
Code:
hook.Add("CalcView", "ebicprankpro", function(ply, origin, angles, fov)
local view = {}
view.origin = origin
view.angles = LocalPlayer():EyeAngles() + Angle(0, 180, 0)
view.fov = fov
return view
end)
Quote Originally Posted by too much sauce View Post
Code:
hook.Add("CalcView", "ebicprankpro", function(ply, origin, angles, fov)
local view = {}
view.origin = origin
view.angles = LocalPlayer():EyeAngles() + Angle(0, 180, 0)
view.fov = fov
return view
end)
Code:
hook.Add("CreateMove", "", function(cmd)
	cmd:GetViewAngles().r = 180
end)
Both wrong...
roll isn't networked and thats changing the yaw

hook.Add("CreateMove", "", function(cmd)
local viewangles = cmd:GetViewAngles()
cmd:SetViewAngles(Angle(180, viewangles.y, 0))
end)
Quote Originally Posted by eth0s View Post
Both wrong...
roll isn't networked and thats changing the yaw

hook.Add("CreateMove", "", function(cmd)
local viewangles = cmd:GetViewAngles()
cmd:SetViewAngles(Angle(180, viewangles.y, 0))
end)
It doesn't matter if roll isn't networked, from what OP is saying this is only going to be used clientside. To combat the yaw changing you could just add 180 to it.
Quote Originally Posted by Cyaegha View Post
It doesn't matter if roll isn't networked, from what OP is saying this is only going to be used clientside. To combat the yaw changing you could just add 180 to it.
where does it imply that its going to be used clientside? and im talking about cdrizas mess of code for the yaw
Quote Originally Posted by eth0s View Post
where does it imply that its going to be used clientside? and im talking about cdrizas mess of code for the yaw
Well the title is a big indicator. "Local Player".
Quote Originally Posted by Cyaegha View Post
Well the title is a big indicator. "Local Player".
yea doesn't mean clientside only
Quote Originally Posted by eth0s View Post
yea doesn't mean clientside only
LocalPlayer is client-side only. Whether OP knows that or not is unclear.

If he plans to run this on his friends, he's going to have to use the SendLua method.
pasted from lennys!!
If he is just wanting to make it only client-sided for him to only see those methods should work.

[EDIT] nevermind the first one is it's just turns the player around.
Posts 1–11 of 11 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Talk with us