Garry's Mod Wiki

Entity:LookupSequence

  number, number Entity:LookupSequence( string name )

Description

Returns sequence ID from its name. See Entity:GetSequenceName for a function that does the opposite.

Sequences are animations tied to a specific model. Different models can have sequences with same names, but have different IDs.
Sequences can also be tied to certain activities (ACT enum), see Entity:SelectWeightedSequence.

Arguments

1 string name
Sequence name.

Returns

1 number
Sequence ID for that name. This will differ for models with same sequence names. Will be -1 when the sequence is invalid or not found.
2 number
The sequence duration, or 0 if the sequence is invalid or there's no sequence with given name on entity's current model.