Hey guys,
Just wondering if anyone can point me in the right direction, I just need the right command that will disable the movement of the mouse completely and also I also need the right command for setting a players view angle to 90 degree's. Ive tried searching Facepunch and Lua Wiki but not luck, Thanks for reading.
[B]Edit:
Whoops sorry guys had a rethink, Does anyone know how to disable the mouse movement for left and right while keeping the up and down movements?[/B]
[editline]11:08PM[/editline]
Any ideas guys?
[QUOTE=Jazora;23477979]Hey guys,
Just wondering if anyone can point me in the right direction, I just need the right command that will disable the movement of the mouse completely and also I also need the right command for setting a players view angle to 90 degree's. Ive tried searching Facepunch and Lua Wiki but not luck, Thanks for reading.
[B]Edit:
Whoops sorry guys had a rethink, Does anyone know how to disable the mouse movement for left and right while keeping the up and down movements?[/B]
[editline]11:08PM[/editline]
Any ideas guys?[/QUOTE]
Still looking for a answer please
[QUOTE=DarKSunrise;23490977]Here.
local angle;
hook.Add("CreateMove", "Restrict left-right mouse movement", function(cmd)
angle = cmd:GetViewAngles();
angle.y = 0;
angle.r = 0;
cmd:SetViewAngles(angle);
end);[/QUOTE]
Thanks for the reply Dark Sunrise it worked, My only problem is that it will not let me do +right/+left which I need for the script is there a way to let it still do +right/+left here is the code:
[lua]
function mySetupMove2( )
for k, v in pairs( player.GetAll() ) do
if (v:KeyDown(IN_MOVELEFT)) then
v:ConCommand("+left")
else
v:ConCommand("-left")
end
end
end
hook.Add( "Think", "mySetupMove2", mySetupMove2 )
[/lua]
[QUOTE=Dave_Parker;23495702]In that case, you're probably better off disabling the commands in PlayerBindPress and then simulating left/right using CreateMove.
No code because I have to go now.[/QUOTE]
Thanks for the reply Dave, Unfortunately I have no clue how to do what you said :S
Sorry, you need to Log In to post a reply to this thread.