Garry's Mod Wiki

Entity:SetAnimation

  Entity:SetAnimation( number playerAnim )

Description

We advise against using this. It may be changed or removed in a future update. Leftover function from Goldsrc transition to set player's main sequence. It is never used after 9-way walk sequence blending since Team Fortress 2. You should be using GM:CalcMainActivity or Player:DoCustomAnimEvent instead.

Sets a player's third-person animation. Despite the function existing for all entities, it will work only on players.

Arguments

1 number playerAnim
Player animation, see PLAYER enum. Only types PLAYER_ATTACK1 and PLAYER_RELOAD play holdtype specific gestures, other enums don't do anything.