Cancelling Movement

Saw a few threads about altering input in the move hooks, but couldn’t figure out why disabling the jump/duck here works, but not moving left.
[lua]
function GM:SetupMove(ply, moveData)
local buttons = moveData:GetButtons()
if bit.band(buttons, IN_JUMP) != 0 then
buttons = bit.band(buttons, bit.bnot(IN_JUMP))
end
if bit.band(buttons, IN_DUCK) != 0 then
buttons = bit.band(buttons, bit.bnot(IN_DUCK))
end
if bit.band(buttons, IN_MOVELEFT) != 0 then
buttons = bit.band(buttons, bit.bnot(IN_MOVELEFT))
end
moveData:SetButtons(buttons)
end
[/lua]

I tried printing moveData:GetButtons() after I set them at the end and when I move left it prints 0 yet I still go left.

[editline]29th December 2013[/editline]

It’s in a shared file by the way

Use GM:CreateMove(cmd) client-side.


data:SetMaxSpeed( 1 )
data:SetMaxClientSpeed( 1 )
data:SetVelocity( vector_origin )
data:SetOrigin( pl:GetPos( ) )

Should stop movement completely.

Gave me the same affect. I removed the SetupMove function to make sure.

[editline]29th December 2013[/editline]

I just want to disable these few specific ones. I could just use cmd:ClearMovement() to stop all movement if I wanted to.