Garry's Mod Wiki

Entity:LookupAttachment

  number Entity:LookupAttachment( string attachmentName )

Description

Returns the attachment index of the given attachment name.

Arguments

1 string attachmentName
The name of the attachment.

Returns

1 number
The attachment index, or 0 if the attachment does not exist and -1 if the model is invalid.