Gah! No! This has some really weird results.
If I do
[code]function GM:CreateMove( cmd )
cmd:SetButtons( IN_RIGHT ) //can be anything at all
end[/code]
Movement and some input is exactly the same.
Jumping, sprinting, walking and crouching are completely blocked.
What is going on?
You have an extra end.
If removing the extra end doesn't help, try
[lua]hook.Add("CreateMove", "hookname", function(cmd)
cmd:SetButtons(IN_RIGHT)
end)[/lua]
Extra end was bad copying on my end.
Hooking has identical result to overriding. Player doesn't spin as I would expect, instead movement is normal and most input doesn't do anything.
Also I noticed this time around primary and secondary fire are blocked as well.
Are you running it clientside?
If you're not sure whether it's working or not, add cmd:SetViewAngles(Angle(0, 0, 0)) in the createmove hook and see if you can move your aim. If not, it worked.
You should also try cmd:SetSideMove(0) or some other variation of the parameters, the wiki doesn't list them.
I am running it clientside.
SetViewAngles and SetSideMove work fine, SetButtons just seems to be completely broken.
Sorry, you need to Log In to post a reply to this thread.