Garry's Mod Wiki

CUserCmd:SetButtons

  CUserCmd:SetButtons( number buttons )

Description

Sets the buttons as a bitflag. See also CUserCmd:GetButtons.

If you are looking to affect player movement, you may need to use CUserCmd:SetForwardMove instead of setting the keys.

Arguments

1 number buttons
Bitflag representing which buttons are "down", see IN enum.