I was testing out a birds-eye-veiw code when i suddenly got this idea to make the players i a birds-eye-veiw gamemode only be able to aim in the yaw angle. Are there any way to disable the pitch and roll aim so the players are only able to aim with yaw?
[lua]
hook.Add( "Think", "YawAngleOnly", function()
for k,v in pairs( player.GetAll() ) do
local ang = v:GetAngles()
ang.pitch = 0
ang.roll = 0
v:SetAngles(ang)
end
end )
[/lua]
Not tested, but should work.
[QUOTE=PurpleMario16;43737449][lua]
hook.Add( "Think", "YawAngleOnly", function()
for k,v in pairs( player.GetAll() ) do
local ang = v:GetAngles()
ang.pitch = 0
ang.roll = 0
v:SetAngles(ang)
end
end )
[/lua]
Not tested, but should work.[/QUOTE]
Don't use Think hook for this, use CreateMove.
[QUOTE=Robotboy655;43737485]Don't use Think hook for this, use CreateMove.[/QUOTE]
Actually i forgot CreateMove's name when i typing it :v:
Sorry, you need to Log In to post a reply to this thread.