Garry's Mod Wiki

Entity:GetBodygroupName

  string Entity:GetBodygroupName( number bodyGroupId )

Description

Retrieves the name of the Body Group corresponding to a given Body Group ID on the Entity's model.

Weapons will return results from their viewmodels.

Arguments

1 number bodyGroupId
The Body Group ID to get the name of.

Returns

1 string
The name of the Body Group.

Example

Demonstrates the use of this function.

Output: "Weapon" in console, if player 1 is aiming at airboat.