• Lua Help: How to disable a function if player looks down
    2 replies, posted
So i need help with this code, im trying to figure it out but im stuck, how do you stop a primary attack if the player looks down a certain degree?
Something similar to this. Make sure I am using the correct range... GetAngles when looking straight ahead, then get when looking down / up... Input numbers and done. [lua]if ( self.Owner:GetAngles( ).p < 45 || self.Owner:GetAngles( ).p > 135 ) then return; end[/lua]
[QUOTE=Acecool;45160532]Something similar to this. Make sure I am using the correct range... GetAngles when looking straight ahead, then get when looking down / up... Input numbers and done. [lua]if ( self.Owner:GetAngles( ).p < 45 || self.Owner:GetAngles( ).p > 135 ) then return; end[/lua][/QUOTE] ahhhh thank you very much! :)
Sorry, you need to Log In to post a reply to this thread.