Garry's Mod Wiki

Entity:GetBodygroup

number Entity:GetBodygroup( number id )

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: 46ms

DB GetPage 20
Generate Html 3
SaveChanges (1) 9
Render Body 0
Render Sidebar 12