cmd:GetTickCount():numberServer tick the command is for.
The command sent each tick — buttons, angles, movement.
cmd:GetTickCount():numberServer tick the command is for.
cmd:GetCommandNumber():numberSequential command number.
cmd:GetButtons():numberButton flags held in this command.
cmd:SetButtons(buttons:number)Replace the button flags.
cmd:HasButtons(buttons:number):booleanWhether the command holds the given button flags.
cmd:GetViewAngles():number, number, numberView angles as pitch, yaw and roll.
cmd:SetViewAngles(pitch:number, yaw:number, roll:number)Set view angles; also accepts a single Vector3.
cmd:GetForwardMove():numberForward movement amount.
cmd:SetForwardMove(v:number)Set forward movement amount.
cmd:GetSideMove():numberSideways movement amount.
cmd:SetSideMove(v:number)Set sideways movement amount.
cmd:GetUpMove():numberVertical movement amount.
cmd:SetUpMove(v:number)Set vertical movement amount.
cmd:GetSendPacket():booleanWhether this command is sent to the server.
cmd:SetSendPacket(send:boolean)Choke or send this command.
cmd:GetImpulse():numberImpulse value of the command.
cmd:SetImpulse(impulse:number)Set the impulse value.
cmd:GetWeaponSelect():numberWeapon entity handle to select.
cmd:SetWeaponSelect(handle:number)Set the weapon to select.
cmd:GetWeaponSubtype():numberWeapon subtype of the command.
cmd:SetWeaponSubtype(subtype:number)Set the weapon subtype.
cmd:GetRandomSeed():numberRandom seed of the command.
cmd:SetRandomSeed(seed:number)Set the random seed.
cmd:GetMouseDX():numberMouse delta X of the command.
cmd:GetMouseDY():numberMouse delta Y of the command.
cmd:GetHasBeenPredicted():booleanWhether the command has been predicted.
buttons:numberpropButton flags as a field.
viewangles:Vector3View angles as a Vector3 field; assigning calls SetViewAngles.
Holding space jumps the instant you touch the ground.
callbacks.Register("CreateMove", function(cmd)
local me = client.GetLocalPlayer()
if not me:IsValid() or not me:IsAlive() then return end
if not client.IsKeyDown(KEY_SPACE) then return end
local vel = me:GetVelocity()
if math.abs(vel.z) < 0.5 then
cmd.buttons = cmd.buttons | IN_JUMP
end
end)