Garry's Mod Wiki

Garry's Mod Wiki

  number Entity:GetBodygroup( number bodyGroupId )

Description

Returns the Sub Model ID for the currently active Sub Model of the Body Group corresponding to the given Body Group ID.

Weapons will return results from their viewmodels.

Arguments

1 number bodyGroupId
The Body Group ID to retrieve the active Sub Model ID for.
Body Group IDs start at 0.

Returns

1 number
The currently active Sub Model ID.
Sub Model IDs start at 0.

Example

Gets the value of bodygroup 2 of entity player 1 is aiming at.

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

This site is a community mirror of the official Garry's Mod wiki.. This site is not maintained by Facepunch Studios.

Page content is automatically updated four times a day. Edits and history are not available.

Last Parsed: Loading...