Garry's Mod Wiki

CMoveData:SetVelocity

  CMoveData:SetVelocity( Vector velocity )

Description

Sets the player's velocity

Arguments

1 Vector velocity
The velocity to set

Example

Make the player shake to hell and back.

function GM:SetupMove( ply, movedata ) movedata:SetVelocity( VectorRand() * 800 ) end