Garry's Mod Wiki

Revision Difference

Entity:GetBodygroupName#544786

<function name="GetBodygroupName" parent="Entity" type="classfunc"> <description>Gets the name of specific bodygroup for given entity. <note>If called for Weapon with different body groups on world model and view model will return value form view model.</note> <note>If called for Weapon (after Initialize hook) with different body groups on world model and view model will return value form view model.</note> </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( Entity( 1 ):GetEyeTrace().Entity:GetBodygroupName( 1 ) )</code> <output>"Weapon" in console, if player 1 is aiming at airboat.</output> </example>