Trying to set a players angle serverside, I'm currently using:
[CODE]
for k, v in pairs( ents.FindByClass( beds ) ) do
ang = v:GetAngles()
ply:SetAngles( Angle( ang ) + Angle( 0, 180, 0 ) )
end
[/CODE]
But this doesn't work, it works clientside, but it doesn't do it when you look at other players serverside, I've also tried setrenderangles, and that also didn't work.
Any help would be appreciated.
You are setting the same player's angles multiple times for no reason. Also, are you sure it's being ran serverside?
Yeah, I'm sure, it's in a serverside file.
Try SetEyeAngles
Doesn't seem to work either, is it because I'm trying to do it on Bots?
It seems to set there position then they flick back to their original position, whereas when I do it, in thirdperson and firstperson I'm facing the right way.
Can you post more code context?
This is the whole function:
[CODE]function freeze( ply )
if ply:IsPlayer() then
ply:Freeze( true )
local beds = "bed_one"
for k, v in pairs( ents.FindByClass( beds ) ) do
pos = v:GetPos()
ang = v:GetAngles()
ply:SetPos( pos + ply:GetAngles():Up() * 55 )
ply:SetEyeAngles( Angle( ang ) + Angle( 0, 180, 0 ) )
ply:StripWeapons()
end
end
end[/CODE]
You can't set bots angles, you should test that stuff with yourself
[QUOTE=gonzalolog;52620133]You can't set bots angles, you should test that stuff with yourself[/QUOTE]
Ah, okay, damnit. Thought it might of been because of that!
Thank you so much!
Sorry, you need to Log In to post a reply to this thread.