Garry's Mod Wiki

Entity:GetBodygroup

Description

Gets the exact value for specific bodygroup of given entity.

Arguments

1 number id
The id of bodygroup to get value of. Starts from 0.

Returns

1 number
Current bodygroup. Starts from 0.

Example

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

print( Entity(1):GetEyeTrace().Entity:GetBodygroup(2) )
Output: "1" in console, if player 1 is aiming at airboat.

Page Links


Special Pages


Wikis

?

Render Time: 36ms

Session 0
DB GetPage 3
Generate Html 7
SaveChanges 11
Render Body 0
Render Sidebar 12