Garry's Mod Wiki

Revision Difference

Entity:GetBodygroupName#529350

<function name="GetBodygroupName" parent="Entity" type="classfunc"> <description>Gets the name of specific bodygroup for given entity.</description> <realm>Shared</realm> <args> <arg name="id" type="number">The id of bodygroup to get the name of.</arg> </args> <rets> <ret name="" type="string">The name of the bodygroup</ret> </rets> </function> <example> <description>Demonstrates the use of this function.</description> <code>print( player.GetByID(1):GetEyeTrace().Entity:GetBodygroupName(1) )</code> <code>print( Entity( 1 ):GetEyeTrace().Entity:GetBodygroupName( 1 ) )</code> <output>"Weapon" in console, if player 1 is aiming at airboat.</output> </example>