Hey everyone of you awesome gmod guys!
so basicly i want to fix the players aim so that he/she cannot look up/down.
my trouble being that all the methods ive tried prevents the player to rotate around themselves.
ive tried with SetEyeAngles, and i have no clue how to actual do it.
even though i only set the Z-axis to be fixed they cannot rotate..
please help <3
I think you need to do it in [img]http://wiki.garrysmod.com/favicon.ico[/img] [url=http://wiki.garrysmod.com/page/GM/SetupMove]GM:SetupMove[/url], look at the examples to get an idea.
at SetupMove all the functions related to angles seems to be broken, they even mention this in the wiki :(
[QUOTE=grunewald;51146483]at SetupMove all the functions related to angles seems to be broken, they even mention this in the wiki :([/QUOTE]
Where does it say that?
[QUOTE=tzahush;51146891]Where does it say that?[/QUOTE]
It does not say directly at setupmove..
But:
[url]http://wiki.garrysmod.com/page/CMoveData/SetAngles[/url]
[url]http://wiki.garrysmod.com/page/CMoveData/SetAbsMoveAngles[/url]
The wiki might be wrong... can you confirm that it's actually not working? (I'm not saying it IS wrong, but it might be)
Well i did test it.. i might be doing something wrong, but i dont Think so..
[QUOTE=grunewald;51147309]Well i did test it.. i might be doing something wrong, but i dont Think so..[/QUOTE]
Give us your code?
[code]
hook.Add( "SetupMove", "Drowning:HandleWaterInLungs", function( ply, mv, cmd )
mv:SetAngles( Angle(0,0,0) )
end )
[/code]
not even this seems to work :(
[lua]hook.Add("StartCommand", "Stuff", function(ply, ucmd)
local ang = ucmd:GetViewAngles()
ang.p = 0
ucmd:SetViewAngles(ang)
end)
[/lua]
Run this shared, this should do the trick.
[QUOTE=Zeh Matt;51150999][lua]hook.Add("StartCommand", "Stuff", function(ply, ucmd)
local ang = ucmd:GetViewAngles()
ang.p = 0
ucmd:SetViewAngles(ang)
end)
[/lua]
Run this shared, this should do the trick.[/QUOTE]
oh my freaking god, this works! thank you so much <3
[editline]4th October 2016[/editline]
how do i mark for being "solved"
Sorry, you need to Log In to post a reply to this thread.